Always clear PDO assignment of configured sync managers. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Fri, 22 Jan 2016 10:11:58 +0100
branchstable-1.5
changeset 2653 291dddb7233e
parent 2640 b11e1014edfe
child 2655 a5c9005fe7a8
Always clear PDO assignment of configured sync managers.
lib/slave_config.c
master/slave_config.c
--- a/lib/slave_config.c	Thu Feb 25 15:23:42 2016 +0100
+++ b/lib/slave_config.c	Fri Jan 22 10:11:58 2016 +0100
@@ -232,8 +232,9 @@
         if (ret)
             return ret;
 
+        ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
+
         if (sync_info->n_pdos && sync_info->pdos) {
-            ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
 
             for (j = 0; j < sync_info->n_pdos; j++) {
                 pdo_info = &sync_info->pdos[j];
--- a/master/slave_config.c	Thu Feb 25 15:23:42 2016 +0100
+++ b/master/slave_config.c	Fri Jan 22 10:11:58 2016 +0100
@@ -702,8 +702,9 @@
         if (ret)
             return ret;
 
+        ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
+
         if (sync_info->n_pdos && sync_info->pdos) {
-            ecrt_slave_config_pdo_assign_clear(sc, sync_info->index);
 
             for (j = 0; j < sync_info->n_pdos; j++) {
                 pdo_info = &sync_info->pdos[j];