From 9615190a75ab0304d37701e97947ffe36be2d345 Mon Sep 17 00:00:00 2001 From: henryk Date: Thu, 13 Mar 2008 04:17:46 +0000 Subject: Add forgotten sanity check git-svn-id: https://svn.openpcd.org:2342/trunk@451 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/ssc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openpicc/application/ssc.c b/openpicc/application/ssc.c index 6c53ebd..e25d982 100644 --- a/openpicc/application/ssc.c +++ b/openpicc/application/ssc.c @@ -637,6 +637,7 @@ ssc_handle_t* ssc_open(u_int8_t init_rx, u_int8_t init_tx, enum ssc_mode mode, s int ssc_recv(ssc_handle_t* sh, ssc_dma_rx_buffer_t* *buffer,unsigned int timeout) { if(sh == NULL) return -EINVAL; + if(!sh->rx_enabled) return -EINVAL; taskENTER_CRITICAL(); if(sh->rx_running) { -- cgit v1.2.3