if (profile_gproxy)
return profile_gproxy;
- gconn = _bt_get_system_private_conn();
+ /* Shared connection should be used because rfcomm interface was registered
+ * on shared connection not private. Otherwise, dbus rejection is occured
+ * because dbus policy is only applied on shared connection not private. */
+ gconn = _bt_get_system_shared_conn();
if (gconn == NULL)
return NULL;
NULL, &err);
if (err) {
g_dbus_error_strip_remote_error(err);
- BT_ERR("RegisterProfile failed: %s", err->message);
+ BT_ERR("RegisterProfile2 failed: %s", err->message);
if (g_strrstr(err->message, BT_ACCESS_DENIED_MSG))
result = BLUETOOTH_ERROR_ACCESS_DENIED;
if (err) {
g_dbus_error_strip_remote_error(err);
- BT_ERR("RegisterProfile failed: %s", err->message);
+ BT_ERR("RegisterProfile1 failed: %s", err->message);
if (g_strrstr(err->message, BT_ACCESS_DENIED_MSG))
result = BLUETOOTH_ERROR_ACCESS_DENIED;