From 100017e7e2af0a24a80121e038d81125e9ab8f93 Mon Sep 17 00:00:00 2001 From: Tamas Cseke Date: Fri, 25 Nov 2011 11:59:03 +0100 Subject: [PATCH] FS-3719 --resolve --- src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c b/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c index 636fcd9dba..9ffd5121aa 100644 --- a/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c +++ b/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c @@ -663,6 +663,9 @@ static switch_status_t my_on_reporting(switch_core_session_t *session) wrote = write(fd, json_text, (unsigned) strlen(json_text)); close(fd); fd = -1; + if(wrote < 0) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error writing [%s]\n",path); + } } else { char ebuf[512] = { 0 }; #ifdef WIN32 @@ -816,6 +819,9 @@ static switch_status_t my_on_reporting(switch_core_session_t *session) wrote = write(fd, json_text, (unsigned) strlen(json_text)); close(fd); fd = -1; + if(wrote < 0) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error writing [%s]\n",path); + } break; } else { char ebuf[512] = { 0 };