[svn-commits] oej: branch oej/pgtips-srv-and-outbound-stuff-1.8 r421528 - /team/oej/pgtips-...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 20 05:09:01 CDT 2014


Author: oej
Date: Wed Aug 20 05:08:56 2014
New Revision: 421528

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421528
Log:
Fix list of shadow peers

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=421528&r1=421527&r2=421528
==============================================================================
--- 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 05:08:56 2014
@@ -18325,18 +18325,19 @@
 		ast_cli(fd, "  DTMFmode     : %s\n", dtmfmode2str(ast_test_flag(&peer->flags[0], SIP_DTMF)));
 		ast_cli(fd, "  Timer T1     : %d\n", peer->timer_t1);
 		ast_cli(fd, "  Timer B      : %d\n", peer->timer_b);
-		ast_cli(fd, "  Domain       : %s\n", ast_strlen_zero(peer->srvdomain) ? "N/A" : peer->srvdomain);
-		ast_cli(fd, "  ToHost       : %s\n", peer->tohost);
 		ast_cli(fd, "  Addr->IP     : %s\n", ast_sockaddr_stringify(&peer->addr));
 		ast_cli(fd, "  Defaddr->IP  : %s\n", ast_sockaddr_stringify(&peer->defaddr));
-		if (!(AST_LIST_EMPTY(&peer->peer_shadows)) {
+		ast_cli(fd, "  ToHost       : %s\n", peer->tohost);
+		ast_cli(fd, "  Domain       : %s\n", ast_strlen_zero(peer->srvdomain) ? "N/A" : peer->srvdomain);
+		if (!AST_LIST_EMPTY(&peer->peer_shadows)) {
 			struct sip_shadow_peer *shadow;
 			int id = 0;
-			ast_cli,fd, "  SRV entries for domain %s:\n", peer->srvdomain);
+			ast_cli(fd, "  SRV entries for domain %s:\n", peer->srvdomain);
 			AST_LIST_TRAVERSE_SAFE_BEGIN(&peer->peer_shadows, shadow, entry) {
 				id++;
-				ast_cli(fd, "    %-2.2d : %s %s:%u\n", id, shadow->peer->tohost, ast_sockaddr_stringify(&shadow->peer->defaddr));
-			}
+				ast_cli(fd, "    %-2.2d : %s %s Peer: %s\n", id, shadow->hostname, ast_sockaddr_stringify(&shadow->peer->addr), shadow->peer->name);
+			}
+			AST_LIST_TRAVERSE_SAFE_END;
 		}
 		ast_cli(fd, "  Prim.Transp. : %s\n", get_transport(peer->socket.type));
 		ast_cli(fd, "  Allowed.Trsp : %s\n", get_transport_list(peer->transports));
@@ -18519,6 +18520,7 @@
 	ao2_iterator_destroy(&user_iter);
 	return result;
 }
+
 /*! \brief Support routine for 'sip show user' CLI */
 static char *complete_sip_show_user(const char *line, const char *word, int pos, int state)
 {




More information about the svn-commits mailing list