Minor: Again moved setting of alternate PDO mapping flag.
authorFlorian Pose <fp@igh-essen.com>
Thu, 20 Sep 2007 10:15:21 +0000
changeset 746 ef0f6eb5cd7c
parent 745 3f4e5a50733e
child 747 ac8a822c3e5b
Minor: Again moved setting of alternate PDO mapping flag.
master/slave.c
master/sync.c
--- a/master/slave.c	Thu Sep 20 10:05:37 2007 +0000
+++ b/master/slave.c	Thu Sep 20 10:15:21 2007 +0000
@@ -1432,7 +1432,11 @@
         return -1;
     }
 
-    return ec_sync_add_pdo(sync, pdo);
+    if (ec_sync_add_pdo(sync, pdo))
+        return -1;
+
+    sync->alt_mapping = 1;
+    return 0;
 }
 
 /*****************************************************************************/
--- a/master/sync.c	Thu Sep 20 10:05:37 2007 +0000
+++ b/master/sync.c	Thu Sep 20 10:15:21 2007 +0000
@@ -172,7 +172,6 @@
     mapped_pdo->sync_index = sync->index;
 
     list_add_tail(&mapped_pdo->list, &sync->pdos);
-    sync->alt_mapping = 1;
     return 0;
 }