Only load default assignment, if slave was attached.
authorFlorian Pose <fp@igh-essen.com>
Wed, 18 Jun 2008 11:13:30 +0000
changeset 1023 7b8961141042
parent 1022 8e49b519e6ba
child 1024 fef0b1953770
Only load default assignment, if slave was attached.
master/master.c
--- a/master/master.c	Wed Jun 18 10:13:58 2008 +0000
+++ b/master/master.c	Wed Jun 18 11:13:30 2008 +0000
@@ -1348,8 +1348,8 @@
                 alias, position, vendor_id, product_code);
 
         // try to find the addressed slave
-        ec_slave_config_attach(sc);
-        ec_slave_config_load_default_assignment(sc);
+        if (!ec_slave_config_attach(sc))
+            ec_slave_config_load_default_assignment(sc);
 
         list_add_tail(&sc->list, &master->configs);
     }