X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bt-service%2Fbt-service-agent.c;h=d231908bcbba156b10d988f13cd41d599dd7fdbb;hb=fe4f8a1ad930daab9e7f8f5250b03ff9deb84f81;hp=92a36abbf06721e3aaee960a71f5a4e217917c4b;hpb=27684cccaeba4696b5a05b8bc2dc0d3e6618f706;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git diff --git a/bt-service/bt-service-agent.c b/bt-service/bt-service-agent.c index 92a36ab..d231908 100644 --- a/bt-service/bt-service-agent.c +++ b/bt-service/bt-service-agent.c @@ -38,7 +38,7 @@ #include "bt-service-device.h" #include "bt-service-audio.h" -#ifdef TIZEN_FEATURE_BT_DPM +#ifdef TIZEN_DPM_ENABLE #include "bt-service-dpm.h" #endif @@ -264,7 +264,7 @@ static gboolean __pincode_request(GapAgentPrivate *agent, GDBusProxy *device) BT_DBG("+"); -#ifdef TIZEN_FEATURE_BT_DPM +#ifdef TIZEN_DPM_ENABLE if (_bt_dpm_get_bluetooth_pairing_state() == DPM_RESTRICTED) { BT_ERR("Not allow to pair the device"); gap_agent_reply_confirmation(agent, GAP_AGENT_REJECT, NULL); @@ -369,7 +369,7 @@ static gboolean __passkey_request(GapAgentPrivate *agent, GDBusProxy *device) GVariant *tmp_value; BT_DBG("+"); -#ifdef TIZEN_FEATURE_BT_DPM +#ifdef TIZEN_DPM_ENABLE if (_bt_dpm_get_bluetooth_pairing_state() == DPM_RESTRICTED) { BT_ERR("Not allow to pair the device"); gap_agent_reply_confirmation(agent, GAP_AGENT_REJECT, NULL); @@ -498,7 +498,7 @@ static gboolean __confirm_request(GapAgentPrivate *agent, GDBusProxy *device, GVariant *tmp_value; BT_DBG("+ passkey[%.6d]", passkey); -#ifdef TIZEN_FEATURE_BT_DPM +#ifdef TIZEN_DPM_ENABLE if (_bt_dpm_get_bluetooth_pairing_state() == DPM_RESTRICTED) { BT_ERR("Not allow to pair the device"); gap_agent_reply_confirmation(agent, GAP_AGENT_REJECT, NULL); @@ -961,12 +961,6 @@ static gboolean __bt_agent_is_device_blacklist(const char *address, rewind(fp); buffer = g_malloc0(sizeof(char) * size); - /* Fix : NULL_RETURNS */ - if (buffer == NULL) { - BT_ERR("Fail to allocate memory"); - fclose(fp); - return FALSE; - } result = fread((char *)buffer, 1, size, fp); fclose(fp); if (result != size) {