mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 14:58:34 +00:00
add error checking
This commit is contained in:
1 parent
4b2f56daf1
commit
09e386deda
1 file changed
+4
-2
+4
-2
@@ -47,8 +47,10 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (esl_attach_handle(&handle, client_sock, addr) != ESL_SUCCESS || !handle.info_event) {
|
||||||
esl_attach_handle(&handle, client_sock, addr);
|
esl_log(ESL_LOG_ERROR, "Socket Error\n");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(path = esl_event_get_header(handle.info_event, "variable_ivr_path"))) {
|
if (!(path = esl_event_get_header(handle.info_event, "variable_ivr_path"))) {
|
||||||
esl_disconnect(&handle);
|
esl_disconnect(&handle);
|
||||||
|
|||||||
Reference in new issue
Block a user