Change-Id: I366ce94bfb71d3c63a88faaf75a0fc980f035dad
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
&error);
if (!result) {
+ int ret = BLUETOOTH_ERROR_INTERNAL;
if (error != NULL) {
BT_ERR("StopDiscovery failed (Error: %s)", error->message);
+
+ if (g_strrstr(error->message, "No discovery started"))
+ ret = BLUETOOTH_ERROR_NOT_IN_OPERATION;
+
g_clear_error(&error);
- } else
+ } else {
BT_ERR("StopDiscovery failed");
- return BLUETOOTH_ERROR_INTERNAL;
+ }
+
+ return ret;
}
cancel_by_user = TRUE;