MethodCall::reply(int error) accepts E_NONE 69/116969/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 07:11:16 +0000 (16:11 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 07:11:16 +0000 (16:11 +0900)
Change-Id: I4666e07d91d34e79ef10eb93421cfdb5a6743de8
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/server/MethodCall.cpp

index c8e53cd..5fa6e1d 100644 (file)
@@ -69,7 +69,9 @@ bool MethodCall::reply(GVariant* param)
 bool MethodCall::reply(int error)
 {
        IF_FAIL_RETURN_TAG(__invocation, false, _D, "Replied already");
-       IF_FAIL_RETURN_TAG(error != E_NONE, false, _E, "Invalid error code");
+
+       if (error == E_NONE)
+               return reply(NULL);
 
        g_dbus_method_invocation_return_error_literal(__invocation, CTX_ERROR_DOMAIN, error, "");
        __invocation = NULL;