[svn-commits] mattf: branch mattf/bug13495 r235 - /team/mattf/bug13495/ss7.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Dec 6 11:50:02 CST 2008


Author: mattf
Date: Sat Dec  6 11:50:02 2008
New Revision: 235

URL: http://svn.digium.com/view/libss7?view=rev&rev=235
Log:
Fix the point code output for ANSI networks on ss7 show linkset x

Modified:
    team/mattf/bug13495/ss7.c

Modified: team/mattf/bug13495/ss7.c
URL: http://svn.digium.com/view/libss7/team/mattf/bug13495/ss7.c?view=diff&rev=235&r1=234&r2=235
==============================================================================
--- team/mattf/bug13495/ss7.c (original)
+++ team/mattf/bug13495/ss7.c Sat Dec  6 11:50:02 2008
@@ -566,9 +566,12 @@
 	struct adjacent_sp *adj_sp;
 	struct mtp2 *link;
 	struct mtp3_route *cur;
+	char pc_str[64];
+
+	ss7_pc_to_str(ss7->switchtype, ss7->pc, pc_str);
 	
 	cust_printf(fd, "Switch type: %s\n", (ss7->switchtype == SS7_ITU) ? "ITU" : "ANSI");
-	cust_printf(fd, "Our point code: %i\n", ss7->pc);
+	cust_printf(fd, "Our point code: %s\n", pc_str);
 	cust_printf(fd, "SLS shift: %i\n", ss7->sls_shift);
 	cust_printf(fd, "numlinks: %i\n", ss7->numlinks);
 	cust_printf(fd, "numsps: %i\n", ss7->numsps);
@@ -576,7 +579,8 @@
 
 	for (j = 0; j < ss7->numsps; j++) {
 		adj_sp = ss7->adj_sps[j];
-		cust_printf(fd, "  ---------------------------------\n  Adjacent SP PC: %i STATE: %s\n", adj_sp->adjpc, mtp3_state(adj_sp->state));
+		ss7_pc_to_str(ss7->switchtype, adj_sp->adjpc, pc_str);
+		cust_printf(fd, "  ---------------------------------\n  Adjacent SP PC: %s STATE: %s\n", pc_str, mtp3_state(adj_sp->state));
 		cust_printf(fd, "  TRA:  %s%s    T19: %s\n", (adj_sp->tra & GOT) ? "GOT " : "", (adj_sp->tra & SENT) ? "SENT" : "",
 				(adj_sp->timer_t19 > -1) ? "running" : "not running");
 
@@ -584,7 +588,8 @@
 		cust_printf(fd, "    DPC       State        T6       T10\n");
 		cur = adj_sp->routes;
 		while (cur) {
-			cust_printf(fd, "%7i%12s%10s%10s\n", cur->dpc, route_state(cur->state), (cur->t6 > -1) ? "running" : "-",
+			ss7_pc_to_str(ss7->switchtype, cur->dpc, pc_str);
+			cust_printf(fd, "%s %12s%10s%10s\n", pc_str, route_state(cur->state), (cur->t6 > -1) ? "running" : "-",
 					(cur->t10 > -1) ? "running" : "-");
 			cur = cur->next;
 		}
@@ -602,7 +607,8 @@
 				}
 			}
 
-			cust_printf(fd, "  Link SLC: %i\n", link->slc);
+			ss7_pc_to_str(ss7->switchtype, link->adj_sp->adjpc, pc_str);
+			cust_printf(fd, "  Link ADJ_PC:SLC: %s:%i\n", pc_str, link->slc);
 			cust_printf(fd, "    State:      %s,  %s\n", linkstate2strext(link->state), mtp2state2str(ss7, link));
 			cust_printf(fd, "    STD Test:  %s\n", link->std_test_passed ? "passed" : "failed");
 			cust_printf(fd, "    Got, sent :%s\n", got_sent2str(got_sent_buf, link->got_sent_netmsg));




More information about the svn-commits mailing list