[asterisk-commits] oej: branch oej/pgtips-srv-and-outbound-stuff-1.8 r421532 - /team/oej/pgtips-...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 20 07:37:09 CDT 2014
Author: oej
Date: Wed Aug 20 07:37:05 2014
New Revision: 421532
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421532
Log:
Change the way we list shadow peers in "sip show peers" so it's easier to see
the shadows as copies of the master
Modified:
team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c?view=diff&rev=421532&r1=421531&r2=421532
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c Wed Aug 20 07:37:05 2014
@@ -17571,14 +17571,16 @@
return unref_peer(peer, "toss iterator peer ptr no match");
}
- if (!ast_strlen_zero(peer->username) && !s) {
- snprintf(name, sizeof(name), "%s/%s", peer->name, peer->username);
- } else {
- ast_copy_string(name, peer->name, sizeof(name));
- }
-
if (peer->type & SIP_TYPE_PEERSHADOW) {
cont->peershadows++;
+ /* Shadow peer */
+ snprintf(name, sizeof(name), "- %s", peer->name);
+ } else {
+ if (!ast_strlen_zero(peer->username) && !s) {
+ snprintf(name, sizeof(name), "%s/%s", peer->name, peer->username);
+ } else {
+ ast_copy_string(name, peer->name, sizeof(name));
+ }
}
pstatus = peer_status(peer, status, sizeof(status));
More information about the asterisk-commits
mailing list