This patch covers with fail response if no advertising proxy was
registered at command beginning.
Change-Id: I6dcbf3b95e82b83c6ef782b272c924c2c9780f5d
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
}
if (!l_dbus_proxy_get_property(adapter->proxy, "Powered", "b", &prop) ||
- !prop || !ad.registered)
+ !prop || !adapter->ad_proxy || !ad.registered)
goto failed;
- if (adapter->ad_proxy) {
- if (!l_dbus_proxy_method_call(adapter->ad_proxy,
+ if (!l_dbus_proxy_method_call(adapter->ad_proxy,
"UnregisterAdvertisement",
unreg_advertising_setup,
stop_advertising_reply,
- NULL, NULL)) {
- status = BTP_ERROR_FAIL;
- goto failed;
- }
- }
+ NULL, NULL))
+ goto failed;
return;