[libss7-commits] rmudgett: trunk r320 - /trunk/

SVN commits to the libss7 project libss7-commits at lists.digium.com
Mon Oct 1 15:05:28 CDT 2012


Author: rmudgett
Date: Mon Oct  1 15:05:24 2012
New Revision: 320

URL: http://svnview.digium.com/svn/libss7?view=rev&rev=320
Log:
Quiet unconditional libss7 debug messages unless enabled.

Patches:
      SS7-27_libss7_trunk2_v3.diff (license #5506) patch uploaded by Kaloyan Kovachev
      With some modifications.

Modified:
    trunk/isup.c
    trunk/mtp2.c
    trunk/mtp3.c
    trunk/ss7_internal.h
    trunk/ss7linktest.c

Modified: trunk/isup.c
URL: http://svnview.digium.com/svn/libss7/trunk/isup.c?view=diff&rev=320&r1=319&r2=320
==============================================================================
--- trunk/isup.c (original)
+++ trunk/isup.c Mon Oct  1 15:05:24 2012
@@ -5185,7 +5185,7 @@
 			param->timer == ISUP_TIMER_T21 || param->timer == ISUP_TIMER_T22) {
 		ss7_error(param->ss7, "ISUP timer %s expired on CIC %i DPC %i\n", isup_timer2str(param->timer), param->c->cic, param->c->dpc);
 	} else {
-		ss7_message(param->ss7, "ISUP timer %s expired on CIC %i DPC %i\n", isup_timer2str(param->timer), param->c->cic, param->c->dpc);
+		ss7_debug_msg(param->ss7, SS7_DEBUG_ISUP, "ISUP timer %s expired on CIC %i DPC %i\n", isup_timer2str(param->timer), param->c->cic, param->c->dpc);
 	}
 
 	param->c->timer[param->timer] = -1;
@@ -5322,7 +5322,7 @@
 		ss7_schedule_del(ss7, &c->timer[timer]);
 		free(param);
 		c->timer[timer] = -1;
-		ss7_message(ss7, "ISUP timer %s stopped on CIC %i DPC: %i\n", isup_timer2str(timer), c->cic, c->dpc);
+		ss7_debug_msg(ss7, SS7_DEBUG_ISUP, "ISUP timer %s stopped on CIC %i DPC: %i\n", isup_timer2str(timer), c->cic, c->dpc);
 	}
 }
 
@@ -5365,7 +5365,7 @@
 	c->timer[timer] = ss7_schedule_event(ss7, ss7->isup_timers[timer], &isup_timer_expiry, data);
 
 	if (c->timer[timer] > -1) {
-		ss7_message(ss7, "ISUP timer %s (%ims) started on CIC %i DPC %i\n", isup_timer2str(timer), ss7->isup_timers[timer], c->cic, c->dpc);
+		ss7_debug_msg(ss7, SS7_DEBUG_ISUP, "ISUP timer %s (%ims) started on CIC %i DPC %i\n", isup_timer2str(timer), ss7->isup_timers[timer], c->cic, c->dpc);
 		return 0;
 	}
 

Modified: trunk/mtp2.c
URL: http://svnview.digium.com/svn/libss7/trunk/mtp2.c?view=diff&rev=320&r1=319&r2=320
==============================================================================
--- trunk/mtp2.c (original)
+++ trunk/mtp2.c Mon Oct  1 15:05:24 2012
@@ -501,9 +501,7 @@
 {
 	struct mtp2 *link = data;
 
-	if (link->master->debug & SS7_DEBUG_MTP2)
-		ss7_message(link->master, "T4 expired!\n");
-
+	ss7_debug_msg(link->master, SS7_DEBUG_MTP2, "MTP2 T4 expired!\n");
 	mtp2_setstate(link, MTP_ALIGNEDREADY);
 
 	return;
@@ -526,8 +524,7 @@
 {
 	ss7_event *e;
 
-	if (link->master->debug & SS7_DEBUG_MTP2)
-		mtp_message(link->master, "Link state change: %s -> %s\n", linkstate2str(link->state), linkstate2str(newstate));
+	ss7_debug_msg(link->master, SS7_DEBUG_MTP2, "Link state change: %s -> %s\n", linkstate2str(link->state), linkstate2str(newstate));
 
 	switch (link->state) {
 		case MTP_ALARM:

Modified: trunk/mtp3.c
URL: http://svnview.digium.com/svn/libss7/trunk/mtp3.c?view=diff&rev=320&r1=319&r2=320
==============================================================================
--- trunk/mtp3.c (original)
+++ trunk/mtp3.c Mon Oct  1 15:05:24 2012
@@ -37,9 +37,6 @@
 #include "mtp2.h"
 #include "mtp3.h"
 #include "isup.h"
-
-#define mtp_error ss7_error
-#define mtp_message ss7_message
 
 char testmessage[] = "2564286288";
 
@@ -542,7 +539,7 @@
 				x != MTP3_TIMER_T2 && x != MTP3_TIMER_T4 && x != MTP3_TIMER_T5 &&
 				x != MTP3_TIMER_T22 && x != MTP3_TIMER_T23) {
 			ss7_schedule_del(link->master, &link->mtp3_timer[x]);
-			ss7_message(link->master, "Stopped MTP3 timer %s on link SLC: %i PC: %i\n", mtp3_timer2str(x), link->slc, link->dpc);
+			ss7_debug_msg(link->master, SS7_DEBUG_MTP3, "Stopped MTP3 timer %s on link SLC: %i PC: %i\n", mtp3_timer2str(x), link->slc, link->dpc);
 		}
 	}
 }
@@ -701,12 +698,12 @@
 
 		if (adj_sp->timer_t19 > -1) {
 			ss7_schedule_del(ss7, &adj_sp->timer_t19);
-			ss7_message(ss7, "MTP3 T19 timer stopped PC: %i\n", adj_sp->adjpc);
+			ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T19 timer stopped PC: %i\n", adj_sp->adjpc);
 		}
 
 		if (adj_sp->timer_t21 > -1) {
 			ss7_schedule_del(ss7, &adj_sp->timer_t21);
-			ss7_message(ss7, "MTP3 T21 timer stopped PC: %i\n", adj_sp->adjpc);
+			ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T21 timer stopped PC: %i\n", adj_sp->adjpc);
 		}
 
 		for (i = 0; i < adj_sp->numlinks; i++) {
@@ -915,7 +912,7 @@
 	struct adjacent_sp *adj_sp = data;
 
 	adj_sp->timer_t19 = -1;
-	ss7_message(adj_sp->master, "MTP3 T19 timer expired PC:%i\n", adj_sp->adjpc);
+	ss7_debug_msg(adj_sp->master, SS7_DEBUG_MTP3, "MTP3 T19 timer expired PC:%i\n", adj_sp->adjpc);
 }
 
 static void mtp3_t21_expiry(void * data)
@@ -924,7 +921,8 @@
 
 	adj_sp->timer_t21 = -1;
 	adj_sp->tra |= GOT;
-	ss7_message(adj_sp->master, "MTP3 T21 timer expired and accepting traffic from PC:%i\n", adj_sp->adjpc);
+	ss7_debug_msg(adj_sp->master, SS7_DEBUG_MTP3,
+		"MTP3 T21 timer expired on PC:%i. Started accepting traffic.\n", adj_sp->adjpc);
 	mtp3_check(adj_sp);
 }
 
@@ -1172,12 +1170,12 @@
 
 			if (ss7->mtp3_timers[MTP3_TIMER_T19] > 0 && mtp2->adj_sp->timer_t19 == -1) {
 				mtp2->adj_sp->timer_t19 = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T19], mtp3_t19_expiry, mtp2->adj_sp);
-				ss7_message(ss7, "MTP3 T19 timer started PC: %i\n", mtp2->adj_sp->adjpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T19 timer started PC: %i\n", mtp2->adj_sp->adjpc);
 			}
 
 			if (mtp2->adj_sp->timer_t21 > -1) {
 				ss7_schedule_del(ss7, &mtp2->adj_sp->timer_t21);
-				ss7_message(ss7, "MTP3 T21 timer stopped PC: %i\n", mtp2->adj_sp->adjpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T21 timer stopped PC: %i\n", mtp2->adj_sp->adjpc);
 			}
 
 			mtp2->adj_sp->tra |= GOT;
@@ -1203,7 +1201,7 @@
 			}
 			if (winner->mtp3_timer[MTP3_TIMER_T2] > -1) {
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T2]);
-				ss7_message(ss7, "MTP3 T2 timer stopped on link SLC: %i ADJPC: %i\n",
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T2 timer stopped on link SLC: %i ADJPC: %i\n",
 						winner->slc, winner->dpc);
 			}
 			winner->got_sent_netmsg &= ~(SENT_COO | SENT_ECO);
@@ -1220,11 +1218,11 @@
 			}
 			winner->got_sent_netmsg &= ~SENT_CBD;
 			if (winner->mtp3_timer[MTP3_TIMER_T4] > -1) {
-				ss7_message(ss7, "MTP3 T4 timer stopped on link SLC: %i ADJPC: %i\n", winner->slc, winner->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T4 timer stopped on link SLC: %i ADJPC: %i\n", winner->slc, winner->dpc);
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T4]);
 			}
 			if (winner->mtp3_timer[MTP3_TIMER_T5] > -1) {
-				ss7_message(ss7, "MTP3 T5 timer stopped on link SLC: %i ADJPC: %i\n", winner->slc, winner->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T5 timer stopped on link SLC: %i ADJPC: %i\n", winner->slc, winner->dpc);
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T5]);
 			}
 			mtp3_changeback(winner);
@@ -1252,7 +1250,7 @@
 		case NET_MNG_ECA:
 			if (winner->mtp3_timer[MTP3_TIMER_T2] > -1) {
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T2]);
-				ss7_message(ss7, "MTP3 T2 timer stopped on link SLC: %i ADJPC: %i\n",
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T2 timer stopped on link SLC: %i ADJPC: %i\n",
 						winner->slc, winner->dpc);
 			}
 			winner->got_sent_netmsg &= ~(SENT_ECO | SENT_COO);
@@ -1264,7 +1262,7 @@
 				winner->inhibit |= INHIBITED_REMOTELY;
 				mtp3_timed_changeover(winner);
 				if (ss7->mtp3_timers[MTP3_TIMER_T23] > 0) {
-					ss7_message(ss7, "MTP3 T23 timer started on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+					ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T23 timer started on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 					winner->mtp3_timer[MTP3_TIMER_T23] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T23], &mtp3_t23_expired, winner);
 				}
 			} else {
@@ -1284,11 +1282,11 @@
 			mtp3_changeback(winner);
 			if (winner->mtp3_timer[MTP3_TIMER_T23] > -1) {
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T23]);
-				ss7_message(ss7, "MTP3 T23 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T23 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 			}
 			if (winner->mtp3_timer[MTP3_TIMER_T13] > -1) {
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T13]);
-				ss7_message(ss7, "MTP3 T13 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T13 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 			}
 			return 0;
 		case NET_MNG_LIA:
@@ -1302,11 +1300,11 @@
 					ss7_check(ss7);
 				}
 				if (ss7->mtp3_timers[MTP3_TIMER_T22] > 0) {
-					ss7_message(ss7, "MTP3 T22 timer started on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+					ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T22 timer started on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 					winner->mtp3_timer[MTP3_TIMER_T22] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T22], &mtp3_t22_expired, winner);
 				}
 				if (winner->mtp3_timer[MTP3_TIMER_T14] > 0) {
-					ss7_message(ss7, "MTP3 T14 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+					ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T14 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 					ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T14]);
 				}
 			}
@@ -1318,10 +1316,10 @@
 				mtp3_changeback(winner);
 				if (winner->mtp3_timer[MTP3_TIMER_T12] > -1) {
 					ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T12]);
-					ss7_message(ss7, "MTP3 T12 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+					ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T12 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 				}
 				if (winner->mtp3_timer[MTP3_TIMER_T22] > -1) {
-					ss7_message(ss7, "MTP3 T22 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+					ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T22 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 					ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T22]);
 				}
 			}
@@ -1342,7 +1340,7 @@
 			ss7_error(ss7, "Our inhibit request denied on link SLC: %i ADJPC: %i\n", winner->slc, winner->dpc);
 			winner->got_sent_netmsg &= ~SENT_LIN;
 			if (winner->mtp3_timer[MTP3_TIMER_T14] > 0) {
-				ss7_message(ss7, "MTP3 T14 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T14 timer stopped on link SLC: %i ADJPC %i\n", winner->slc, winner->dpc);
 				ss7_schedule_del(ss7, &winner->mtp3_timer[MTP3_TIMER_T14]);
 			}
 			return 0;
@@ -1388,7 +1386,7 @@
 
 	link->mtp3_timer[MTP3_TIMER_T5] = -1;
 	link->got_sent_netmsg &= ~SENT_CBD;
-	ss7_message(ss7, "MTP3 T5 timer expired on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+	ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T5 timer expired on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 	mtp3_t3_expired(link);
 }
 
@@ -1397,13 +1395,13 @@
 	struct mtp2 *link = data;
 	struct ss7 *ss7 = link->master;
 
-	ss7_message(ss7, "MTP3 T4 timer expired on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+	ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T4 timer expired on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 	AUTORL(rl, link);
 	net_mng_send(link, NET_MNG_CBD, rl, link->cb_seq);
 	link->mtp3_timer[MTP3_TIMER_T4] = -1;
 	if (ss7->mtp3_timers[MTP3_TIMER_T5] > 0) {
 		link->mtp3_timer[MTP3_TIMER_T5] = ss7_schedule_event(link->master, ss7->mtp3_timers[MTP3_TIMER_T5], &mtp3_t5_expired, link);
-		ss7_message(ss7, "MTP3 T5 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+		ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T5 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 	}
 }
 
@@ -1487,7 +1485,7 @@
 			if (ss7->mtp3_timers[MTP3_TIMER_T4] > 0 &&
 				link->mtp3_timer[MTP3_TIMER_T4] == -1) {	/* if 0 called from mtp3_t4_expired() */
 					link->mtp3_timer[MTP3_TIMER_T4] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T4], &mtp3_t4_expired, link);
-					ss7_message(ss7, "MTP3 T4 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+					ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T4 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 			}
 			link->cb_seq = (unsigned char) param;		/* save the CBD sequence, we may need on retransmit */
 			/* No break here */
@@ -1502,7 +1500,7 @@
 					ss7_schedule_del(ss7, &link->mtp3_timer[MTP3_TIMER_T2]);
 				}
 				link->mtp3_timer[MTP3_TIMER_T2] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T2], &mtp3_t2_expired, link);
-				ss7_message(ss7, "MTP3 T2 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T2 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 			}
 			/* No break here */
 		case NET_MNG_COA:
@@ -1513,7 +1511,7 @@
 			link->got_sent_netmsg |= SENT_LUN;
 			ss7_msg_userpart_len(m, rllen + 1);		/* no more params */
 			if (ss7->mtp3_timers[MTP3_TIMER_T14] > 0) {
-				ss7_message(ss7, "MTP3 T12 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T12 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 				if (link->mtp3_timer[MTP3_TIMER_T12] == -1) {
 					link->mtp3_timer[MTP3_TIMER_T12] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T12],
 							&mtp3_t12_expired, link);
@@ -1527,7 +1525,7 @@
 			link->got_sent_netmsg |= SENT_LIN;
 			ss7_msg_userpart_len(m, rllen + 1);		/* no more params */
 			if (ss7->mtp3_timers[MTP3_TIMER_T14] > 0) {
-				ss7_message(ss7, "MTP3 T14 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T14 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 				if (link->mtp3_timer[MTP3_TIMER_T14] == -1) {
 					link->mtp3_timer[MTP3_TIMER_T14] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T14],
 							&mtp3_t14_expired, link);
@@ -1553,7 +1551,7 @@
 					ss7_schedule_del(ss7, &link->mtp3_timer[MTP3_TIMER_T2]);
 				}
 				link->mtp3_timer[MTP3_TIMER_T2] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T2], &mtp3_t2_expired, link);
-				ss7_message(ss7, "MTP3 T2 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T2 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 			}
 			ss7_msg_userpart_len(m, rllen + 1);		/* no more params */
 			break;
@@ -1563,7 +1561,7 @@
 		case NET_MNG_LFU:
 			link->got_sent_netmsg |= SENT_LFU;
 			if (ss7->mtp3_timers[MTP3_TIMER_T13] > 0) {
-				ss7_message(ss7, "MTP3 T13 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
+				ss7_debug_msg(ss7, SS7_DEBUG_MTP3, "MTP3 T13 timer started on link SLC: %i ADJPC: %i\n", link->slc, link->dpc);
 				if (link->mtp3_timer[MTP3_TIMER_T13] == -1) {
 					link->mtp3_timer[MTP3_TIMER_T13] = ss7_schedule_event(ss7, ss7->mtp3_timers[MTP3_TIMER_T13],
 							&mtp3_t13_expired, link);
@@ -1872,7 +1870,7 @@
 
 	/* Check NI to make sure it's set correct */
 	if (ss7->ni != ni) {
-		mtp_error(ss7, "Received MSU with network indicator of %s, but we are %s\n", ss7_ni2str(ni), ss7_ni2str(ss7->ni));
+		ss7_error(ss7, "Received MSU with network indicator of %s, but we are %s\n", ss7_ni2str(ni), ss7_ni2str(ss7->ni));
 		return -1;
 	}
 
@@ -1880,7 +1878,7 @@
 	rlsize = get_routinglabel(ss7->switchtype, sif, &rl);
 
 	if (ss7->pc != rl.dpc) {
-		mtp_error(ss7, "Received message destined for point code 0x%x but we're 0x%x.  Dropping\n", rl.dpc, ss7->pc);
+		ss7_error(ss7, "Received message destined for point code 0x%x but we're 0x%x.  Dropping\n", rl.dpc, ss7->pc);
 		return -1;
 	}
 
@@ -1903,7 +1901,7 @@
 			return net_mng_receive(ss7, link, &rl, sif, siflen);
 		case SIG_SCCP:
 		default:
-			mtp_message(ss7, "Unable to process message destined for userpart %d; dropping message\n", userpart);
+			ss7_message(ss7, "Unable to process message destined for userpart %d; dropping message\n", userpart);
 			return 0;
 	}
 }

Modified: trunk/ss7_internal.h
URL: http://svnview.digium.com/svn/libss7/trunk/ss7_internal.h?view=diff&rev=320&r1=319&r2=320
==============================================================================
--- trunk/ss7_internal.h (original)
+++ trunk/ss7_internal.h Mon Oct  1 15:05:24 2012
@@ -147,6 +147,13 @@
 void ss7_message(struct ss7 *ss7, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
 void ss7_error(struct ss7 *ss7, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
 
+#define ss7_debug_msg(ctrl, flags, ...)			\
+	do {										\
+		if ((ctrl)->debug & (flags)) {			\
+			ss7_message(ctrl, __VA_ARGS__);		\
+		}										\
+	} while (0)
+
 void ss7_dump_buf(struct ss7 *ss7, int tabs,  unsigned char *buf, int len);
 
 void ss7_dump_msg(struct ss7 *ss7, unsigned char *buf, int len);

Modified: trunk/ss7linktest.c
URL: http://svnview.digium.com/svn/libss7/trunk/ss7linktest.c?view=diff&rev=320&r1=319&r2=320
==============================================================================
--- trunk/ss7linktest.c (original)
+++ trunk/ss7linktest.c Mon Oct  1 15:05:24 2012
@@ -320,7 +320,7 @@
 	ss7_set_error(myprintf);
 	ss7_set_network_ind(ss7, SS7_NI_NAT);
 
-	ss7_set_debug(ss7, 0xfffffff);
+	ss7_set_debug(ss7, 0xffffffff);
 	if ((ss7_add_link(ss7, ismtp2 ? SS7_TRANSPORT_DAHDIMTP2 : SS7_TRANSPORT_DAHDIDCHAN, fd, -1, dpc))) {
 		perror("ss7_add_link");
 		exit(1);




More information about the libss7-commits mailing list