diff options
Diffstat (limited to 'apps/app_osplookup.c')
-rw-r--r-- | apps/app_osplookup.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c index bee5dae1d..93968ccee 100644 --- a/apps/app_osplookup.c +++ b/apps/app_osplookup.c @@ -1193,7 +1193,7 @@ static int osp_finish( int recorded, int cause, time_t start, - time_t connect, + time_t connect_time, time_t end, unsigned int release) { @@ -1216,11 +1216,11 @@ static int osp_finish( error = OSPPTransactionReportUsage( handle, - difftime(end, connect), + difftime(end, connect_time), start, end, alert, - connect, + connect_time, isPddInfoPresent, pdd, release, @@ -1664,7 +1664,7 @@ static int ospfinished_exec( int inhandle = OSP_INVALID_HANDLE; int outhandle = OSP_INVALID_HANDLE; int recorded = 0; - time_t start, connect, end; + time_t start, connect_time, end; unsigned int release; char buffer[OSP_INTSTR_SIZE]; const char* status; @@ -1713,24 +1713,24 @@ static int ospfinished_exec( if (chan->cdr) { start = chan->cdr->start.tv_sec; - connect = chan->cdr->answer.tv_sec; - if (connect) { + connect_time = chan->cdr->answer.tv_sec; + if (connect_time) { end = time(NULL); } else { - end = connect; + end = connect_time; } } else { start = 0; - connect = 0; + connect_time = 0; end = 0; } ast_debug(1, "OSPFinish: start '%ld'\n", start); - ast_debug(1, "OSPFinish: connect '%ld'\n", connect); + ast_debug(1, "OSPFinish: connect '%ld'\n", connect_time); ast_debug(1, "OSPFinish: end '%ld'\n", end); release = ast_check_hangup(chan) ? 0 : 1; - if (osp_finish(outhandle, recorded, cause, start, connect, end, release) <= 0) { + if (osp_finish(outhandle, recorded, cause, start, connect_time, end, release) <= 0) { ast_debug(1, "OSPFinish: Unable to report usage for outbound call\n"); } switch (cause) { @@ -1740,7 +1740,7 @@ static int ospfinished_exec( cause = AST_CAUSE_NO_ROUTE_DESTINATION; break; } - if (osp_finish(inhandle, recorded, cause, start, connect, end, release) <= 0) { + if (osp_finish(inhandle, recorded, cause, start, connect_time, end, release) <= 0) { ast_debug(1, "OSPFinish: Unable to report usage for inbound call\n"); } snprintf(buffer, sizeof(buffer), "%d", OSP_INVALID_HANDLE); |