]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_posix_timer: comply with gcc -pedantic
authorTravis Cross <tc@traviscross.com>
Tue, 8 May 2012 18:13:07 +0000 (18:13 +0000)
committerTravis Cross <tc@traviscross.com>
Tue, 8 May 2012 18:13:07 +0000 (18:13 +0000)
Thanks to Thierry Panthier for pointing this out.

src/mod/timers/mod_posix_timer/mod_posix_timer.c

index 04d694b5f7555dbaccffaf14bb2b30e9c0104251..c170d8fa20efc71afa9ba66d7c32b213685d7c80 100644 (file)
@@ -111,7 +111,9 @@ static void timer_signal_handler(int sig, siginfo_t *si, void *cu)
                if (val >= 0 && val <= MAX_ACTIVE_TIMERS) {
                        uint8_t active_id = (uint8_t)val;
                        /* notify runtime thread that timer identified by active_id has ticked */
-                       write(globals.timer_tick_pipe[1], &active_id, 1);
+                       if (write(globals.timer_tick_pipe[1], &active_id, 1) == -1) {
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error writing to pipe: %s\n", strerror(errno));
+                       }
                }
        }
 }