[libpri-commits] mattf: trunk r382 - /trunk/q921.c

libpri-commits at lists.digium.com libpri-commits at lists.digium.com
Fri Nov 3 11:16:50 MST 2006


Author: mattf
Date: Fri Nov  3 12:16:49 2006
New Revision: 382

URL: http://svn.digium.com/view/libpri?rev=382&view=rev
Log:
Remove pointless recursion. (#8281)

Modified:
    trunk/q921.c

Modified: trunk/q921.c
URL: http://svn.digium.com/view/libpri/trunk/q921.c?rev=382&r1=381&r2=382&view=diff
==============================================================================
--- trunk/q921.c (original)
+++ trunk/q921.c Fri Nov  3 12:16:49 2006
@@ -68,8 +68,10 @@
 static int q921_transmit(struct pri *pri, q921_h *h, int len) 
 {
 	int res;
-	if (pri->master)
-		return q921_transmit(pri->master, h, len);
+
+	while (pri->master)
+		pri = pri->master;
+
 #ifdef RANDOM_DROPS
    if (!(random() % 3)) {
          pri_message(pri, " === Dropping Packet ===\n");



More information about the libpri-commits mailing list