From: Jiwoong Im Date: Wed, 26 Apr 2017 01:52:53 +0000 (+0900) Subject: Fix certificate check step in datacontrol noti api X-Git-Tag: accepted/tizen/unified/20170428.033027~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F127023%2F1;p=platform%2Fcore%2Fappfw%2Fdata-control.git Fix certificate check step in datacontrol noti api Change-Id: If5e9670a469413f676709676fad1200868c1299b Signed-off-by: Jiwoong Im --- diff --git a/src/data_control_noti.c b/src/data_control_noti.c index f90c87b..860e9d9 100644 --- a/src/data_control_noti.c +++ b/src/data_control_noti.c @@ -34,10 +34,8 @@ EXPORT_API int data_control_add_data_change_cb( retval = datacontrol_check_cert(provider->provider_id, true, NULL); if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED) { retval = datacontrol_check_cert(provider->provider_id, false, NULL); - if (retval != DATA_CONTROL_ERROR_NONE) - return retval; - } else if (retval != DATA_CONTROL_ERROR_NONE) { - return retval; + if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED) + return DATA_CONTROL_ERROR_PERMISSION_DENIED; } return datacontrol_add_data_change_cb( @@ -63,10 +61,8 @@ EXPORT_API int data_control_remove_data_change_cb(data_control_h provider, int c retval = datacontrol_check_cert(provider->provider_id, true, NULL); if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED) { retval = datacontrol_check_cert(provider->provider_id, false, NULL); - if (retval != DATA_CONTROL_ERROR_NONE) - return retval; - } else if (retval != DATA_CONTROL_ERROR_NONE) { - return retval; + if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED) + return DATA_CONTROL_ERROR_PERMISSION_DENIED; } return datacontrol_remove_data_change_cb((datacontrol_h)provider, callback_id);