]> Zhao Yanbai Git Server - minix.git/commitdiff
Small fix for ioctls.
authorPhilip Homburg <philip@cs.vu.nl>
Tue, 8 Nov 2005 13:57:48 +0000 (13:57 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Tue, 8 Nov 2005 13:57:48 +0000 (13:57 +0000)
servers/inet/sr.c

index 393a351fd2c517addb98366ebc849439978f6245..ed26b7433d6d44df8dec5323037d054a72cf9a34 100644 (file)
@@ -375,6 +375,8 @@ mq_t *m;
                                (vir_bytes)m->mq_mess.NDEV_BUFFER);
                        r= sr_put_userdata(sr_fd-sr_fd_table, r, NULL, 1);
                        assert(r == OK);
+                       assert(sr_fd->srf_flags & first_flag);
+                       sr_fd->srf_flags &= ~first_flag;
                        return OK;
                }
 
@@ -386,6 +388,8 @@ mq_t *m;
                        r= sr_put_userdata(sr_fd-sr_fd_table, EINVAL, 
                                NULL, 1);
                        assert(r == OK);
+                       assert(sr_fd->srf_flags & first_flag);
+                       sr_fd->srf_flags &= ~first_flag;
                        return OK;
                }
                r= (*sr_fd->srf_ioctl)(sr_fd->srf_fd, request);