Code cleanup
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-pbap.c
index fa9e27b..d69b66a 100644 (file)
@@ -319,7 +319,7 @@ int _bt_pbap_connect(const bluetooth_device_address_t *address)
 
        _bt_convert_addr_type_to_string(address_string, (unsigned char *)address->addr);
        BT_DBG("Address String: %s", address_string);
-       g_conn = _bt_gdbus_get_system_gconn();
+       g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                        BT_ERR("Couldn't connect to session bus");
                        return EXIT_FAILURE;
@@ -998,7 +998,7 @@ int __bt_pbap_call_get_vcard(GDBusProxy *proxy, bt_pbap_data_t *pbap_data)
 //
 //****************************
 
-       snprintf(vcard, 20, "%d.vcf", app_param->index);
+       sprintf(vcard, "%d.vcf", app_param->index);
        BT_DBG("Handle: %s", vcard);
        vcard_handle = g_strdup(vcard);
        BT_DBG("vcard_handle: %s", vcard_handle);
@@ -1148,7 +1148,7 @@ int _bt_pbap_get_phonebook_size(const bluetooth_device_address_t *address,
                        address_string, source_string, type_string);
        BT_DBG("Session Path = %s\n", g_pbap_session_path);
 
-       g_conn = _bt_gdbus_get_system_gconn();
+       g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
                g_free(source_string);
@@ -1237,7 +1237,7 @@ int _bt_pbap_get_phonebook(const bluetooth_device_address_t *address,
 
        BT_DBG("Session Path = %s\n", g_pbap_session_path);
 
-       g_conn = _bt_gdbus_get_system_gconn();
+       g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
                g_free(source_string);
@@ -1325,7 +1325,7 @@ int _bt_pbap_get_list(const bluetooth_device_address_t *address, int source,
 
        BT_DBG("Session Path = %s\n", g_pbap_session_path);
 
-       g_conn = _bt_gdbus_get_system_gconn();
+       g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
                g_free(source_string);
@@ -1414,7 +1414,7 @@ int _bt_pbap_pull_vcard(const bluetooth_device_address_t *address,
 
        BT_DBG("Session Path = %s\n", g_pbap_session_path);
 
-       g_conn = _bt_gdbus_get_system_gconn();
+       g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
                g_free(source_string);
@@ -1501,7 +1501,7 @@ int _bt_pbap_phonebook_search(const bluetooth_device_address_t *address,
 
        BT_DBG("Session Path = %s\n", g_pbap_session_path);
 
-       g_conn = _bt_gdbus_get_system_gconn();
+       g_conn = _bt_gdbus_get_session_gconn();
        if (g_conn == NULL) {
                BT_ERR("Couldn't connect to session bus");
                g_free(source_string);