[Asterisk-cvs] asterisk pbx.c,1.185,1.186
markster at lists.digium.com
markster at lists.digium.com
Sun Dec 19 12:20:35 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv5064
Modified Files:
pbx.c
Log Message:
SMS fix, pbx optimization (bug #3098)
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- pbx.c 18 Dec 2004 22:04:06 -0000 1.185
+++ pbx.c 19 Dec 2004 17:16:38 -0000 1.186
@@ -3925,7 +3925,7 @@
return res;
}
-static void ext_strncpy(char *dst, const char *src, int len)
+static int ext_strncpy(char *dst, const char *src, int len)
{
int count=0;
@@ -3944,6 +3944,8 @@
count++;
}
*dst = '\0';
+
+ return count;
}
/*
@@ -4002,13 +4004,11 @@
p += strlen(label) + 1;
}
tmp->exten = p;
- ext_strncpy(tmp->exten, extension, strlen(extension) + 1);
- p += strlen(extension) + 1;
+ p += ext_strncpy(tmp->exten, extension, strlen(extension) + 1) + 1;
tmp->priority = priority;
tmp->cidmatch = p;
if (callerid) {
- ext_strncpy(tmp->cidmatch, callerid, strlen(callerid) + 1);
- p += strlen(callerid) + 1;
+ p += ext_strncpy(tmp->cidmatch, callerid, strlen(callerid) + 1) + 1;
tmp->matchcid = 1;
} else {
tmp->cidmatch[0] = '\0';
More information about the svn-commits
mailing list