Module: sip-router
Branch: master
Commit: 89262590e4d47e480fb4984f18e12b4e4edb4ca6
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8926259…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 6 18:18:48 2013 +0100
acc: strftime() returns 0 on error
---
modules/acc/acc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/acc/acc.c b/modules/acc/acc.c
index efaebc0..c44a9e4 100644
--- a/modules/acc/acc.c
+++ b/modules/acc/acc.c
@@ -301,7 +301,7 @@ int acc_log_request( struct sip_msg *rq)
t = gmtime(&acc_env.ts);
}
if(strftime(acc_time_format_buf, ACC_TIME_FORMAT_SIZE,
- acc_time_format, t)<0) {
+ acc_time_format, t)<=0) {
acc_time_format_buf[0] = '\0';
}
LM_GEN2(log_facility, log_level, "%.*stimestamp=%lu;%s=%s%s",
@@ -463,7 +463,7 @@ int acc_db_request( struct sip_msg *rq)
t = gmtime(&acc_env.ts);
}
if(strftime(acc_time_format_buf, ACC_TIME_FORMAT_SIZE,
- acc_time_format, t)<0) {
+ acc_time_format, t)<=0) {
acc_time_format_buf[0] = '\0';
}
VAL_STRING(db_vals+(m++)) = acc_time_format_buf;