[Asterisk-cvs] asterisk cdr.c,1.10,1.11
jeremy at lists.digium.com
jeremy at lists.digium.com
Sat Jan 10 21:31:19 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv15402
Modified Files:
cdr.c
Log Message:
Add application to log user data to the CDRs
Index: cdr.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cdr.c 17 Sep 2003 04:21:56 -0000 1.10
+++ cdr.c 11 Jan 2004 03:23:05 -0000 1.11
@@ -345,6 +345,27 @@
return 0;
}
+int ast_cdr_setuserfield(struct ast_channel *chan, char *userfield)
+{
+ struct ast_cdr *cdr = chan->cdr;
+
+ if (cdr)
+ strncpy(cdr->userfield, userfield, sizeof(cdr->userfield) - 1);
+ return 0;
+}
+
+int ast_cdr_appenduserfield(struct ast_channel *chan, char *userfield)
+{
+ struct ast_cdr *cdr = chan->cdr;
+
+ if (cdr)
+ {
+ int len = strlen(cdr->userfield);
+ strncpy(cdr->userfield+len, userfield, sizeof(cdr->userfield) - len - 1);
+ }
+ return 0;
+}
+
int ast_cdr_update(struct ast_channel *c)
{
struct ast_cdr *cdr = c->cdr;
More information about the svn-commits
mailing list