From af3be7b21d6d5b76c4d9afe874fe84b3be8105a7 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Wed, 24 Aug 2011 14:44:12 -0400 Subject: [PATCH] Silence a silly warning about ignored return values --- src/mod/event_handlers/mod_erlang_event/ei_helpers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_erlang_event/ei_helpers.c b/src/mod/event_handlers/mod_erlang_event/ei_helpers.c index d7d0952ffc..aaa0cb6b85 100644 --- a/src/mod/event_handlers/mod_erlang_event/ei_helpers.c +++ b/src/mod/event_handlers/mod_erlang_event/ei_helpers.c @@ -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); }