Silence a silly warning about ignored return values

This commit is contained in:
Andrew Thompson 2011-08-24 14:44:12 -04:00
parent 48cf8f9955
commit af3be7b21d
1 changed files with 3 additions and 1 deletions

View 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);
}