merge stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Fri, 16 Sep 2016 11:56:53 +0200
branchstable-1.5
changeset 2656 ad1199dd73e1
parent 2655 a5c9005fe7a8 (diff)
parent 2648 0f4b7d799c44 (current diff)
child 2657 bb2163e6b145
merge
--- a/lib/slave_config.c	Fri May 13 17:43:00 2016 +0200
+++ b/lib/slave_config.c	Fri Sep 16 11:56:53 2016 +0200
@@ -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];
@@ -243,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 May 13 17:43:00 2016 +0200
+++ b/master/slave_config.c	Fri Sep 16 11:56:53 2016 +0200
@@ -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];
@@ -713,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];