Fixed missing initialisation of allow_config flag.
authorFlorian Pose <fp@igh-essen.com>
Fri, 09 Dec 2011 10:31:29 +0100
changeset 2165 1d94f77784a0
parent 2164 cf4db3c282d2
child 2166 1d5a5303f15c
Fixed missing initialisation of allow_config flag.
master/master.c
--- a/master/master.c	Mon Dec 05 11:29:28 2011 +0100
+++ b/master/master.c	Fri Dec 09 10:31:29 2011 +0100
@@ -151,16 +151,18 @@
     master->slave_count = 0;
 
     INIT_LIST_HEAD(&master->configs);
+    INIT_LIST_HEAD(&master->domains);
 
     master->app_time = 0ULL;
+    master->app_start_time = 0ULL;
+    master->has_app_time = 0;
 #ifdef EC_HAVE_CYCLES
     master->dc_cycles_app_start_time = 0;
 #endif
     master->dc_jiffies_app_start_time = 0;
-    master->app_start_time = 0ULL;
-    master->has_app_time = 0;
 
     master->scan_busy = 0;
+    master->allow_scan = 1;
     ec_mutex_init(&master->scan_mutex);
     init_waitqueue_head(&master->scan_queue);
 
@@ -177,8 +179,6 @@
     // send interval in IDLE phase
     ec_master_set_send_interval(master, 1000000 / HZ);
 
-    INIT_LIST_HEAD(&master->domains);
-
     master->debug_level = debug_level;
     master->stats.timeouts = 0;
     master->stats.corrupted = 0;
@@ -226,7 +226,7 @@
     }
 
     // create state machine object
-    ec_mbox_init(&master->fsm_mbox,&master->fsm_datagram);
+    ec_mbox_init(&master->fsm_mbox, &master->fsm_datagram);
     ec_fsm_master_init(&master->fsm, master, &master->fsm_datagram);
 
     // init reference sync datagram