[Asterisk-cvs] asterisk/cdr cdr_odbc.c,1.4,1.5
jeremy at lists.digium.com
jeremy at lists.digium.com
Tue Dec 9 13:26:13 CST 2003
Update of /usr/cvsroot/asterisk/cdr
In directory mongoose.digium.com:/tmp/cvs-serv19496
Modified Files:
cdr_odbc.c
Log Message:
stop seg when no loguniqueid is set in config file. From bkw
Index: cdr_odbc.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr/cdr_odbc.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cdr_odbc.c 7 Dec 2003 19:25:30 -0000 1.4
+++ cdr_odbc.c 9 Dec 2003 19:17:41 -0000 1.5
@@ -92,7 +92,7 @@
return -1;
}
- if((strcmp(loguniqueid, "1") == 0) || (strcmp(loguniqueid, "yes") == 0))
+ if((loguniqueid != NULL) && ((strcmp(loguniqueid, "1") == 0) || (strcmp(loguniqueid, "yes") == 0)))
{
sprintf(sqlcmd,"INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s',%i,%i,%i,%i,'%s','%s')", timestr, clid, cdr->src, cdr->dst, dcontext, channel, dstchannel, lastapp, lastdata, cdr->duration, cdr->billsec, cdr->disposition, cdr->amaflags, cdr->accountcode, uniqueid);
}
@@ -299,6 +299,7 @@
else
{
ast_log(LOG_ERROR,"cdr_odbc: Not logging uniqueid\n");
+ loguniqueid = NULL;
}
}
else
More information about the svn-commits
mailing list