d2d-conv-manager: initialize dbus connection before dbus call 98/110498/1 accepted/tizen/common/20170117.175015 accepted/tizen/mobile/20170118.041154 accepted/tizen/tv/20170118.041216 accepted/tizen/wearable/20170118.041220 submit/tizen/20170117.095800
authorHongkuk, Son <hongkuk.son@samsung.com>
Tue, 17 Jan 2017 00:12:05 +0000 (09:12 +0900)
committerHongkuk, Son <hongkuk.son@samsung.com>
Tue, 17 Jan 2017 00:16:31 +0000 (09:16 +0900)
Bug is detected when UTC executing for line coverage.
When we call conv_service_get_connection_state(), there is a CRASH.
In this case, d2d API is calling dbus call without dbus connection init.
So, we add dbus connection init before dbus call.

Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: I9b8d097a4b704fe47f3695fbb71fc9ea0a3d85ec

lib/dbus_client.cpp

index a413967..17bab45 100755 (executable)
@@ -243,6 +243,10 @@ int conv::dbus_client::register_callback(const char* subject, subject_response_c
 
 int conv::dbus_client::call(const char* subject)
 {
+       _D("Calling: %s", subject);
+       IF_FAIL_RETURN_TAG(subject, CONV_ERROR_INVALID_PARAMETER, _E, "Invalid parameter");
+       IF_FAIL_RETURN_TAG(init(), CONV_ERROR_INVALID_OPERATION, _E, "Connection failed");
+
        int ret = CONV_ERROR_NONE;
        GError *err = NULL;