]> Zhao Yanbai Git Server - minix.git/commitdiff
Test receive() return code
authorBen Gras <ben@minix3.org>
Tue, 7 Mar 2006 15:45:14 +0000 (15:45 +0000)
committerBen Gras <ben@minix3.org>
Tue, 7 Mar 2006 15:45:14 +0000 (15:45 +0000)
drivers/at_wini/at_wini.c

index 3e47ec29ca5b933581d511c07c5a63f9f30808c5..39f870ed710dfcd13dc3135fe3c47ccf186efb51 100644 (file)
@@ -1825,7 +1825,12 @@ PRIVATE void w_intr_wait()
   if (w_wn->irq != NO_IRQ) {
        /* Wait for an interrupt that sets w_status to "not busy". */
        while (w_wn->w_status & (STATUS_ADMBSY|STATUS_BSY)) {
-               receive(ANY, &m);               /* expect HARD_INT message */
+               int rr;
+               if((rr=receive(ANY, &m)) != OK) { /* expect HARD_INT message */
+                       printf("w_intr_wait: receive from ANY failed (%d)\n",
+                               r);
+                       continue;       /* try again */
+               }
                if (m.m_type == SYN_ALARM) {    /* but check for timeout */
                    w_timeout();                /* a.o. set w_status */
                } else if (m.m_type == HARD_INT) {