patch from Christian Taedcke <hacking@taedcke.com> : fix-wrong-resetSDOline-for-sdo-timeout.patch
FIXED: - The sdo line must not be closed at the end of SDOTimeoutAlarm() if the same sdo line is closed and reopened for a new transfer inside the callback. (Patch from Jaroslav Fojtik)
--- a/src/sdo.c Mon Aug 29 16:59:55 2011 +0200
+++ b/src/sdo.c Mon Aug 29 17:31:55 2011 +0200
@@ -156,10 +156,10 @@
if(d->transfers[id].Callback)
/*If ther is a callback, it is responsible to close SDO transfer (client)*/
(*d->transfers[id].Callback)(d, nodeId);
-
/*Reset the line if (whoami == SDO_SERVER) or the callback did not close the line.
Otherwise this sdo transfer would never be closed. */
- resetSDOline(d, (UNS8)id);
+ if(d->transfers[id].abortCode == SDOABT_TIMED_OUT)
+ resetSDOline(d, (UNS8)id);
}
#define StopSDO_TIMER(id) \