提交 09e386de authored 作者: Anthony Minessale's avatar Anthony Minessale

add error checking

上级 4b2f56da
......@@ -47,8 +47,10 @@ static void mycallback(esl_socket_t server_sock, esl_socket_t client_sock, struc
return;
}
esl_attach_handle(&handle, client_sock, addr);
if (esl_attach_handle(&handle, client_sock, addr) != ESL_SUCCESS || !handle.info_event) {
esl_log(ESL_LOG_ERROR, "Socket Error\n");
exit(0);
}
if (!(path = esl_event_get_header(handle.info_event, "variable_ivr_path"))) {
esl_disconnect(&handle);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论