[asterisk-commits] oej: branch 1.2 r61038 -
/branches/1.2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Apr 9 12:38:59 MST 2007
Author: oej
Date: Mon Apr 9 14:38:59 2007
New Revision: 61038
URL: http://svn.digium.com/view/asterisk?view=rev&rev=61038
Log:
- Don't send ActionID before Response: header.
- Don't use a blank in an AMI header
Modified:
branches/1.2/channels/chan_sip.c
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=61038&r1=61037&r2=61038
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Mon Apr 9 14:38:59 2007
@@ -8107,7 +8107,6 @@
/*! \brief manager_sip_show_peer: Show SIP peers in the manager API ---*/
static int manager_sip_show_peer( struct mansession *s, struct message *m )
{
- char *id = astman_get_header(m,"ActionID");
char *a[4];
char *peer;
int ret;
@@ -8122,8 +8121,6 @@
a[2] = "peer";
a[3] = peer;
- if (!ast_strlen_zero(id))
- ast_cli(s->fd, "ActionID: %s\r\n",id);
ret = _sip_show_peer(1, s->fd, s, m, 4, a );
ast_cli( s->fd, "\r\n\r\n" );
return ret;
@@ -8155,9 +8152,13 @@
load_realtime = (argc == 5 && !strcmp(argv[4], "load")) ? 1 : 0;
peer = find_peer(argv[3], NULL, load_realtime);
if (s) { /* Manager */
- if (peer)
+ if (peer) {
+ char *id = astman_get_header(m,"ActionID");
+
ast_cli(s->fd, "Response: Success\r\n");
- else {
+ if (!ast_strlen_zero(id))
+ ast_cli(s->fd, "ActionID: %s\r\n",id);
+ } else {
snprintf (cbuf, sizeof(cbuf), "Peer %s not found.\n", argv[3]);
astman_send_error(s, m, cbuf);
return 0;
@@ -8264,7 +8265,7 @@
print_group(fd, peer->pickupgroup, 1);
ast_cli(fd, "VoiceMailbox: %s\r\n", peer->mailbox);
ast_cli(fd, "LastMsgsSent: %d\r\n", peer->lastmsgssent);
- ast_cli(fd, "Call limit: %d\r\n", peer->call_limit);
+ ast_cli(fd, "Call-limit: %d\r\n", peer->call_limit);
ast_cli(fd, "Dynamic: %s\r\n", (ast_test_flag(&peer->flags_page2, SIP_PAGE2_DYNAMIC)?"Y":"N"));
ast_cli(fd, "Callerid: %s\r\n", ast_callerid_merge(cbuf, sizeof(cbuf), peer->cid_name, peer->cid_num, ""));
ast_cli(fd, "RegExpire: %ld seconds\r\n", ast_sched_when(sched,peer->expire));
More information about the asterisk-commits
mailing list