[svn-commits] russell: branch russell/sla_rewrite r53494 - /team/russell/sla_rewrite/apps/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Feb 7 13:43:47 MST 2007


Author: russell
Date: Wed Feb  7 14:43:46 2007
New Revision: 53494

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53494
Log:
Fix a couple of uninitialized variables.

Modified:
    team/russell/sla_rewrite/apps/app_meetme.c

Modified: team/russell/sla_rewrite/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/sla_rewrite/apps/app_meetme.c?view=diff&rev=53494&r1=53493&r2=53494
==============================================================================
--- team/russell/sla_rewrite/apps/app_meetme.c (original)
+++ team/russell/sla_rewrite/apps/app_meetme.c Wed Feb  7 14:43:46 2007
@@ -1095,7 +1095,7 @@
 {
 	struct sla_event *event;
 	struct sla_station *station;
-	struct sla_trunk_ref *trunk_ref;
+	struct sla_trunk_ref *trunk_ref = NULL;
 	char *trunk_name;
 
 	AST_RWLIST_RDLOCK(&sla_stations);
@@ -3014,7 +3014,7 @@
 	AST_LIST_HEAD_NOLOCK_STATIC(ringing_stations, sla_station_ref);
 
 	for (; !sla.stop;) {
-		struct sla_trunk_ref *trunk_ref;
+		struct sla_trunk_ref *trunk_ref = NULL;
 		struct sla_station_ref *station_ref;
 		struct sla_event *event;
 		enum ast_dial_result dial_res = AST_DIAL_RESULT_TRYING;
@@ -3033,7 +3033,7 @@
 				ast_log(LOG_DEBUG, "HOLD, station: %s  trunk: %s\n", 
 					event->station->name, event->trunk_ref->trunk->name);
 				ast_atomic_fetchadd_int((int *) &event->trunk_ref->trunk->hold_stations, 1);
-				trunk_ref->state = SLA_TRUNK_STATE_ONHOLD;
+				event->trunk_ref->state = SLA_TRUNK_STATE_ONHOLD;
 				ast_device_state_changed("SLA:%s_%s", 
 					event->station->name, event->trunk_ref->trunk->name);
 				break;
@@ -3043,7 +3043,7 @@
 				if (ast_atomic_dec_and_test((int *) &event->trunk_ref->trunk->hold_stations) == 1)
 					change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_UP);
 				else {
-					trunk_ref->state = SLA_TRUNK_STATE_UP;
+					event->trunk_ref->state = SLA_TRUNK_STATE_UP;
 					ast_device_state_changed("SLA:%s_%s",
 						event->station->name, event->trunk_ref->trunk->name);
 				}



More information about the svn-commits mailing list