]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
- serial lockup fix
authorsdhsdh <sdhsdh>
Thu, 17 Sep 2009 17:58:02 +0000 (17:58 +0000)
committersdhsdh <sdhsdh>
Thu, 17 Sep 2009 17:58:02 +0000 (17:58 +0000)
tos/lib/serial/SerialDispatcherP.nc

index e2afe5aff699d13305b86140b9bbde648e0602b4..fd2946b19ab33424ad271e944c92bd1980b85825 100644 (file)
@@ -294,6 +294,9 @@ implementation {
         receiveTaskSize = recvIndex;
         receiveBufferSwap();
         receiveState.state = RECV_STATE_IDLE;
+      } else {
+        // we can't deliver the packet, better free the current buffer.
+        unlockBuffer(receiveState.which);
       }
     }
     if (postsignalreceive){