]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Silence a silly warning about ignored return values
authorAndrew Thompson <andrew@hijacked.us>
Wed, 24 Aug 2011 18:44:12 +0000 (14:44 -0400)
committerAndrew Thompson <andrew@hijacked.us>
Wed, 24 Aug 2011 18:44:12 +0000 (14:44 -0400)
src/mod/event_handlers/mod_erlang_event/ei_helpers.c

index d7d0952ffce727c9dc7d779dde4fd4f8521bd3dc..aaa0cb6b859e82bd47681ef2f3b5e59180a26895 100644 (file)
@@ -82,7 +82,9 @@ void ei_link(listener_t *listener, erlang_pid * from, erlang_pid * to)
 #ifdef WIN32
        send(listener->sockfd, msgbuf, index, 0);
 #else
-       write(listener->sockfd, msgbuf, index);
+       if (write(listener->sockfd, msgbuf, index) == -1) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to link to process on %s\n", listener->peer_nodename);
+       }
 #endif
        switch_mutex_unlock(listener->sock_mutex);
 }