Index: trunk/MagicSoft/Cosy/candrv/sdolist.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/sdolist.cc	(revision 2615)
+++ trunk/MagicSoft/Cosy/candrv/sdolist.cc	(revision 4076)
@@ -20,5 +20,6 @@
 void PendingSDOList::DelAll()
 {
-    fMux.Lock();
+    if (fMux.Lock()==13)
+        cout << "PendingSDOList::DelAll - mutex is already locked by this thread" << endl;
 
     PendingSDO *prev = fFirst;
@@ -35,5 +36,6 @@
     fLast  = fFirst;
 
-    fMux.UnLock();
+    if (fMux.UnLock()==13)
+        cout << "PendingSDOList::DelAll - tried to unlock mutex locked by other thread." << endl;
 }
 
@@ -42,5 +44,6 @@
     PendingSDO *sdo = fFirst;
 
-    fMux.Lock();
+    if (fMux.Lock()==13)
+        cout << "PendingSDOList::Add - mutex is already locked by this thread" << endl;
     while ((sdo=sdo->Next))
         if (sdo->Node==node && sdo->Idx==idx && sdo->Subidx==subidx)
@@ -54,5 +57,6 @@
     fLast->Next = new PendingSDO(node, idx, subidx);
     fLast = fLast->Next;
-    fMux.UnLock();
+    if (fMux.UnLock()==13)
+        cout << "PendingSDOList::Add - tried to unlock mutex locked by other thread." << endl;
 }
 
@@ -62,5 +66,6 @@
     PendingSDO *sdo;
 
-    fMux.Lock();
+    if (fMux.Lock()==13)
+        cout << "PendingSDOList::Del - mutex is already locked by this thread" << endl;
     while ((sdo=prev->Next))
     {
@@ -80,5 +85,6 @@
         break;
     }
-    fMux.UnLock();
+    if (fMux.UnLock()==13)
+        cout << "PendingSDOList::Del - tried to unlock mutex locked by other thread." << endl;
 }
 
@@ -93,5 +99,6 @@
     PendingSDO *sdo = fFirst;
 
-    fMux.Lock();
+    if (fMux.Lock()==13)
+        cout << "PendingSDOList::IsPending(byte) - mutex is already locked by this thread" << endl;
     while ((sdo=sdo->Next))
         if (sdo->Node==node)
@@ -100,5 +107,6 @@
             break;
         }
-    fMux.UnLock();
+    if (fMux.UnLock()==13)
+        cout << "PendingSDOList::IsPending(byte) - tried to unlock mutex locked by other thread." << endl;
 
     return rc;
@@ -110,5 +118,6 @@
     PendingSDO *sdo = fFirst;
 
-    fMux.Lock();
+    if (fMux.Lock()==13)
+        cout << "PendingSDOList::IsPending - mutex is already locked by this thread" << endl;
     while ((sdo=sdo->Next))
         if (sdo->Node==node && sdo->Idx==idx && sdo->Subidx==subidx)
@@ -117,5 +126,6 @@
             break;
         }
-    fMux.UnLock();
+    if (fMux.UnLock()==13)
+        cout << "PendingSDOList::IsPending - tried to unlock mutex locked by other thread." << endl;
 
     return rc;
Index: trunk/MagicSoft/Cosy/candrv/vmodican.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/vmodican.cc	(revision 2615)
+++ trunk/MagicSoft/Cosy/candrv/vmodican.cc	(revision 4076)
@@ -116,12 +116,10 @@
         unsigned char c;
         const int n = read(fd, &c, 1);
-
         if (n<0)
         {
             cerr << "Vmodican: read(" << dec << (int)fd << "," << (void*)&c;
-            cerr << ",1) returned c=" << (int)c << " '" << strerror(errno);
-            cerr << "' (errno = " << errno << ")" << endl;
+            cerr << ",1) returned rc=" << n << " c=" << (int)c << " '";
+            cerr << strerror(errno) << "' (errno = " << errno << ")" << endl;
             continue;
-            //return (void *)1;
         }
 
@@ -936,5 +934,5 @@
 //  and switch the can bus communication on
 //
-VmodIcan::VmodIcan(const char *dev, const int baud, MLog &out) : Log(out), MThread(false, -10)//: CanDriver(dev, baud)
+VmodIcan::VmodIcan(const char *dev, const int baud, MLog &out) : Log(out), MThread(false, 10)//: CanDriver(dev, baud)
 {
     //
