[svn-commits] oej: trunk r216652 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Sep 7 06:31:21 CDT 2009


Author: oej
Date: Mon Sep  7 06:31:19 2009
New Revision: 216652

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=216652
Log:
Simplify the code in this function

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=216652&r1=216651&r2=216652
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Sep  7 06:31:19 2009
@@ -23198,20 +23198,21 @@
 		}
 		p->stimer->st_cached_max_se = global_max_se;
 		return (p->stimer->st_cached_max_se);
-	} else {
-		if (p->stimer->st_cached_min_se) {
-			return p->stimer->st_cached_min_se;
-		} else if (p->peername) {
-			struct sip_peer *pp = find_peer(p->peername, NULL, TRUE, FINDPEERS, FALSE, 0);
-			if (pp) {
-				p->stimer->st_cached_min_se = pp->stimer.st_min_se;
-				unref_peer(pp, "unref peer pointer from find_peer call in st_get_se (2)");
-				return (p->stimer->st_cached_min_se);
-			}
-		}
-		p->stimer->st_cached_min_se = global_min_se;
-		return (p->stimer->st_cached_min_se);
-	}
+	} 
+	/* Find Min SE timer */
+	if (p->stimer->st_cached_min_se) {
+		return p->stimer->st_cached_min_se;
+	} 
+	if (p->peername) {
+		struct sip_peer *pp = find_peer(p->peername, NULL, TRUE, FINDPEERS, FALSE, 0);
+		if (pp) {
+			p->stimer->st_cached_min_se = pp->stimer.st_min_se;
+			unref_peer(pp, "unref peer pointer from find_peer call in st_get_se (2)");
+			return (p->stimer->st_cached_min_se);
+		}
+	}
+	p->stimer->st_cached_min_se = global_min_se;
+	return (p->stimer->st_cached_min_se);
 }
 
 




More information about the svn-commits mailing list