]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/serial/SerialDispatcherP.nc
- serial lockup fix
[tinyos-2.x.git] / 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){