[Asterisk-cvs] asterisk callerid.c,1.25,1.26

markster at lists.digium.com markster at lists.digium.com
Fri Oct 22 15:41:37 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv27683

Modified Files:
	callerid.c 
Log Message:
Fix some callerid output


Index: callerid.c
===================================================================
RCS file: /usr/cvsroot/asterisk/callerid.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- callerid.c	22 Oct 2004 13:08:35 -0000	1.25
+++ callerid.c	22 Oct 2004 19:45:39 -0000	1.26
@@ -679,8 +679,10 @@
 	return __ast_callerid_generate(buf, name, number, 1, codec);
 }
 
-char *ast_callerid_merge(char *buf, int bufsiz, const char *name, const char *num)
+char *ast_callerid_merge(char *buf, int bufsiz, const char *name, const char *num, const char *unknown)
 {
+	if (!unknown)
+		unknown = "<unknown>";
 	if (name && num)
 		snprintf(buf, bufsiz, "\"%s\" <%s>", name, num);
 	else if (name) 
@@ -688,7 +690,7 @@
 	else if (num)
 		strncpy(buf, num, bufsiz - 1);
 	else
-		strncpy(buf, "<unknown>", bufsiz - 1);
+		strncpy(buf, unknown, bufsiz - 1);
 	return buf;
 }
 int ast_callerid_split(const char *buf, char *name, int namelen, char *num, int numlen)




More information about the svn-commits mailing list