[asterisk-commits] trunk r23178 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 28 09:50:33 MST 2006


Author: russell
Date: Fri Apr 28 11:50:32 2006
New Revision: 23178

URL: http://svn.digium.com/view/asterisk?rev=23178&view=rev
Log:
fix sending the group numbers for a sip peer over the manager interface
(issue #7046)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=23178&r1=23177&r2=23178&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Apr 28 11:50:32 2006
@@ -8384,6 +8384,7 @@
 		ast_cli(fd,"\n");
 		ASTOBJ_UNREF(peer,sip_destroy_peer);
 	} else  if (peer && type == 1) { /* manager listing */
+		char buf[256];
 		astman_append(s, "Channeltype: SIP\r\n");
 		astman_append(s, "ObjectName: %s\r\n", peer->name);
 		astman_append(s, "ChanObjectType: peer\r\n");
@@ -8400,9 +8401,9 @@
 		if (!ast_strlen_zero(peer->fromdomain))
 			astman_append(s, "SIP-FromDomain: %s\r\n", peer->fromdomain);
 		astman_append(s, "Callgroup: ");
-		print_group(fd, peer->callgroup, 1);
+		astman_append(s, "%s\r\n", ast_print_group(buf, sizeof(buf), peer->callgroup));
 		astman_append(s, "Pickupgroup: ");
-		print_group(fd, peer->pickupgroup, 1);
+		astman_append(s, "%s\r\n", ast_print_group(buf, sizeof(buf), peer->pickupgroup));
 		astman_append(s, "VoiceMailbox: %s\r\n", peer->mailbox);
 		astman_append(s, "TransferMode: %s\r\n", transfermode2str(peer->allowtransfer));
 		astman_append(s, "LastMsgsSent: %d\r\n", peer->lastmsgssent);



More information about the asterisk-commits mailing list