Commit 22bd7a3d authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

server: Don't clear the QS_POSTMESSAGE flag if there is a pending quit message.

parent 0fd18477
...@@ -482,7 +482,8 @@ static void remove_queue_message( struct msg_queue *queue, struct message *msg, ...@@ -482,7 +482,8 @@ static void remove_queue_message( struct msg_queue *queue, struct message *msg,
if (list_empty( &queue->msg_list[kind] )) clear_queue_bits( queue, QS_SENDMESSAGE ); if (list_empty( &queue->msg_list[kind] )) clear_queue_bits( queue, QS_SENDMESSAGE );
break; break;
case POST_MESSAGE: case POST_MESSAGE:
if (list_empty( &queue->msg_list[kind] )) clear_queue_bits( queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE ); if (list_empty( &queue->msg_list[kind] ) && !queue->quit_message)
clear_queue_bits( queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
break; break;
} }
free_message( msg ); free_message( msg );
...@@ -702,8 +703,11 @@ static int get_quit_message( struct msg_queue *queue, unsigned int flags, ...@@ -702,8 +703,11 @@ static int get_quit_message( struct msg_queue *queue, unsigned int flags,
reply->info = 0; reply->info = 0;
if (flags & GET_MSG_REMOVE) if (flags & GET_MSG_REMOVE)
{
queue->quit_message = 0; queue->quit_message = 0;
if (list_empty( &queue->msg_list[POST_MESSAGE] ))
clear_queue_bits( queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
}
return 1; return 1;
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment