[asterisk-commits] rizzo: branch rizzo/astobj2 r57980 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 6 01:36:53 MST 2007


Author: rizzo
Date: Tue Mar  6 02:36:52 2007
New Revision: 57980

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57980
Log:
complete merging from trunk up to svn 54838


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=57980&r1=57979&r2=57980
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Tue Mar  6 02:36:52 2007
@@ -5360,6 +5360,7 @@
 	const char *search;
 	char *boundary;
 	unsigned int x;
+	int boundaryisquoted = FALSE;
 
 	content_type = get_header(req, "Content-Type");
 
@@ -5383,11 +5384,20 @@
 	if (ast_strlen_zero(search))
 		return 0;
 
+	/* If the boundary is quoted with ", remove quote */
+	if (*search == '\"')  {
+		search++;
+		boundaryisquoted = TRUE;
+	}
 	/* make a duplicate of the string, with two extra characters
 	   at the beginning */
 	boundary = ast_strdupa(search - 2);
 	boundary[0] = boundary[1] = '-';
 
+	/* Remove final quote */
+	if (boundaryisquoted)
+		boundary[strlen(boundary) - 1] = '\0';
+  	 
 	/* search for the boundary marker, but stop when there are not enough
 	   lines left for it, the Content-Type header and at least one line of
 	   body */
@@ -12475,6 +12485,10 @@
 		snprintf(buf, len, "%d", peer->inUse);
 	} else  if (!strcasecmp(colname, "accountcode")) {
 		ast_copy_string(buf, peer->accountcode, len);
+	} else  if (!strcasecmp(colname, "callgroup")) {
+		ast_print_group(buf, len, peer->callgroup);
+	} else  if (!strcasecmp(colname, "pickupgroup")) {
+		ast_print_group(buf, len, peer->pickupgroup);
 	} else  if (!strcasecmp(colname, "useragent")) {
 		ast_copy_string(buf, peer->useragent, len);
 	} else  if (!strcasecmp(colname, "mailbox")) {
@@ -12523,6 +12537,8 @@
 	"- dynamic               Is it dynamic? (yes/no).\n"
 	"- callerid_name         The configured Caller ID name.\n"
 	"- callerid_num          The configured Caller ID number.\n"
+	"- callgroup             The configured Callgroup.\n"
+	"- pickupgroup           The configured Pickupgroup.\n"
 	"- codecs                The configured codecs.\n"
 	"- status                Status (if qualify=yes).\n"
 	"- regexten              Registration extension\n"



More information about the asterisk-commits mailing list