Fixed (again) some non-clean exit in case of SDO failure at init
authorEdouard Tisserant
Fri, 12 Apr 2013 15:41:22 +0900
changeset 2121 11102245e1d4
parent 2120 8e6e6364087e
child 2122 03cf08190ac4
Fixed (again) some non-clean exit in case of SDO failure at init
etherlab/EthercatCFileGenerator.py
--- a/etherlab/EthercatCFileGenerator.py	Thu Apr 11 10:32:58 2013 +0200
+++ b/etherlab/EthercatCFileGenerator.py	Fri Apr 12 15:41:22 2013 +0900
@@ -26,7 +26,7 @@
 SLAVE_CONFIGURATION_TEMPLATE = """
     if (!(slave%(slave)d = ecrt_master_slave_config(master, %(alias)d, %(position)d, 0x%(vendor).8x, 0x%(product_code).8x))) {
         SLOGF(LOG_CRITICAL, "EtherCAT failed to get slave %(device_type)s configuration at alias %(alias)d and position %(position)d.");
-        return -1;
+        goto ecat_failed;
     }
 
     if (ecrt_slave_config_pdos(slave%(slave)d, EC_END, slave_%(slave)d_syncs)) {