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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 20 06:47:13 CDT 2014


Author: oej
Date: Wed Aug 20 06:42:49 2014
New Revision: 421529

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421529
Log:
Counting done right. 

Modified:
    team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c
    team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.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=421529&r1=421528&r2=421529
==============================================================================
--- 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 06:42:49 2014
@@ -28251,7 +28251,6 @@
 	}
 	ast_debug(2, "=== Deleting all shadow peers for peer %s\n", masterpeer->name);
 
-	//AST_LIST_TRAVERSE_SAFE_BEGIN(&masterpeer->peer_shadows, shadow, entry) {
 	while ((shadow = AST_LIST_REMOVE_HEAD(&masterpeer->peer_shadows, entry))) {
 		/* remove shadow peer from IP list */
 		ast_debug(3, "Removing shadow peer %s from tables\n", shadow->peer->name);
@@ -28261,7 +28260,6 @@
 		ast_free(shadow);
 		deletedshadows++;
 	}
-	//AST_LIST_TRAVERSE_SAFE_END;
 	ast_debug(2, "---> Deleted %d shadows from peer %s\n", deletedshadows, masterpeer->name);
 }
 

Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c?view=diff&rev=421529&r1=421528&r2=421529
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c Wed Aug 20 06:42:49 2014
@@ -170,7 +170,7 @@
 	}
 
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&c->entries, current, list) {
-		ast_debug(3, "         ===> Looking at you, %s \n", current->host);
+		ast_debug(3, "         ===> (%d) Looking at you, %s \n", current->host, c->num_records);
 		/* insert this entry just before the first existing
 	   	entry with a higher priority */
 		if (current->priority <= entry->priority) {
@@ -186,8 +186,10 @@
 
 	/* if we didn't find a place to insert the entry before an existing
 	   entry, then just add it to the end */
-	if (entry)
+	if (entry) {
 		AST_LIST_INSERT_TAIL(&c->entries, entry, list);
+		c->num_records++;
+	}
 
 	return 0;
 }
@@ -346,9 +348,9 @@
 		if(context->have_weights) {
 			process_weights(context);
 		}
-		AST_LIST_TRAVERSE(&context->entries, cur, list) {
-			++(context->num_records);
-		}
+		//AST_LIST_TRAVERSE(&context->entries, cur, list) {
+			//++(context->num_records);
+		//}
 	}
 
 	if (chan) {




More information about the svn-commits mailing list