From: Automerge Script Date: Mon, 9 Apr 2007 19:52:12 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.18-netsec~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04011501877f0833e0b525f99476eedd789d3a71;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@61069 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2d8f85815e..eca592bd41 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8194,7 +8194,6 @@ static int _sip_show_peer(int type, int fd, struct mansession *s, struct message /*! \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; @@ -8209,8 +8208,6 @@ static int manager_sip_show_peer( struct mansession *s, struct message *m ) 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; @@ -8242,9 +8239,13 @@ static int _sip_show_peer(int type, int fd, struct mansession *s, struct message 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; @@ -8351,7 +8352,7 @@ static int _sip_show_peer(int type, int fd, struct mansession *s, struct message 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));