From: Ken Rice Date: Tue, 27 Mar 2012 16:06:31 +0000 (-0500) Subject: make compiler stop complaining X-Git-Tag: v1.2-rc1~19^2^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57fac728c6b2c8d90ba975db37275bfa31e04099;p=thirdparty%2Ffreeswitch.git make compiler stop complaining --- diff --git a/libs/esl/ivrd.c b/libs/esl/ivrd.c index 2a2a607202..66f6908d5d 100644 --- a/libs/esl/ivrd.c +++ b/libs/esl/ivrd.c @@ -54,8 +54,11 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc } /* hotwire the socket to STDIN/STDOUT */ - dup2(client_sock, STDIN_FILENO); - dup2(client_sock, STDOUT_FILENO); + if (!(dup2(client_sock, STDIN_FILENO)) && !(dup2(client_sock, STDOUT_FILENO))){ + esl_disconnect(&handle); + esl_log(ESL_LOG_ERROR, "Socket Error hotwiring socket to STDIN/STDOUT!\n"); + return; + } system(path); esl_disconnect(&handle);