sync.c : fixed some endianize problem, and calback de-registering when re-starting service.
--- a/src/sync.c Mon Apr 21 16:34:51 2008 +0200
+++ b/src/sync.c Mon Apr 21 16:37:27 2008 +0200
@@ -86,14 +86,14 @@
**/
void startSYNC(CO_Data* d)
{
+ if(d->syncTimer != TIMER_NONE){
+ stopSYNC(d);
+ }
+
RegisterSetODentryCallBack(d, 0x1005, 0, &OnCOB_ID_SyncUpdate);
RegisterSetODentryCallBack(d, 0x1006, 0, &OnCOB_ID_SyncUpdate);
- if(d->syncTimer != TIMER_NONE){
- stopSYNC(d);
- }
-
- if(*d->COB_ID_Sync & UNS32_LE(0x40000000) && *d->Sync_Cycle_Period)
+ if(*d->COB_ID_Sync & 0x40000000ul && *d->Sync_Cycle_Period)
{
d->syncTimer = SetAlarm(
d,