Use a proper error code when unable to handle an unregister request
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>
Mon, 6 Aug 2012 13:48:40 +0000 (14:48 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Mon, 6 Aug 2012 15:15:23 +0000 (16:15 +0100)
Send NSM_ERROR_STATUS_ERROR rather than -1 back to the caller when an
unregister request could not be handled successfully.

nsm-dummy/nsm-consumer-service.c

index 1272758..0cae168 100644 (file)
@@ -412,7 +412,8 @@ nsm_consumer_service_handle_unregister_shutdown_client (NSMConsumer           *o
   else
     {
       /* notify the caller that we could not handle the unregister request properly */
-      nsm_consumer_complete_un_register_shutdown_client (object, invocation, -1);
+      nsm_consumer_complete_un_register_shutdown_client (object, invocation,
+                                                         NSM_ERROR_STATUS_ERROR);
     }
 
   return TRUE;