From 476c2b4cc312242e3c76c791651b2ce7a3c4616e Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sat, 19 May 2001 17:38:21 +0000 Subject: [PATCH] Fixed reply_message when there is no received message. --- server/queue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/queue.c b/server/queue.c index 1335a10521b..59db06ea789 100644 --- a/server/queue.c +++ b/server/queue.c @@ -244,7 +244,6 @@ static void reply_message( struct msg_queue *queue, unsigned int result, unsigned int error, int remove ) { struct message_result *res = queue->recv_result; - if (!res) set_error( STATUS_ACCESS_DENIED ); /* FIXME */ if (remove) { @@ -728,8 +727,10 @@ DECL_HANDLER(get_message) /* reply to a sent message */ DECL_HANDLER(reply_message) { - if (current->queue) reply_message( current->queue, req->result, 0, req->remove ); - else set_error( STATUS_ACCESS_DENIED ); + if (current->queue && current->queue->recv_result) + reply_message( current->queue, req->result, 0, req->remove ); + else + set_error( STATUS_ACCESS_DENIED ); }