Always clear PDO mapping in ecrt_slave_config_pdos(). stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Fri, 16 Sep 2016 11:56:10 +0200
branchstable-1.5
changeset 2655 a5c9005fe7a8
parent 2653 291dddb7233e
child 2656 ad1199dd73e1
Always clear PDO mapping in ecrt_slave_config_pdos().
lib/slave_config.c
master/slave_config.c
--- a/lib/slave_config.c	Fri Jan 22 10:11:58 2016 +0100
+++ b/lib/slave_config.c	Fri Sep 16 11:56:10 2016 +0200
@@ -244,9 +244,9 @@
                 if (ret)
                     return ret;
 
+                ecrt_slave_config_pdo_mapping_clear(sc, pdo_info->index);
+
                 if (pdo_info->n_entries && pdo_info->entries) {
-                    ecrt_slave_config_pdo_mapping_clear(sc, pdo_info->index);
-
                     for (k = 0; k < pdo_info->n_entries; k++) {
                         entry_info = &pdo_info->entries[k];
 
--- a/master/slave_config.c	Fri Jan 22 10:11:58 2016 +0100
+++ b/master/slave_config.c	Fri Sep 16 11:56:10 2016 +0200
@@ -714,9 +714,9 @@
                 if (ret)
                     return ret;
 
+                ecrt_slave_config_pdo_mapping_clear(sc, pdo_info->index);
+
                 if (pdo_info->n_entries && pdo_info->entries) {
-                    ecrt_slave_config_pdo_mapping_clear(sc, pdo_info->index);
-
                     for (k = 0; k < pdo_info->n_entries; k++) {
                         entry_info = &pdo_info->entries[k];