+ case BT_RFCOMM_LISTEN_AND_ACCEPT: {
+ char *uuid;
+ int socket_fd = -1;
+
+ sender = (char *)g_dbus_method_invocation_get_sender(context);
+ uuid = (char *)g_variant_get_data(in_param1);
+
+ result = _bt_rfcomm_socket_listen(sender, uuid, true);
+ if (result > 0) {
+ BT_ERR("BT_RFCOMM_LISTEN_AND_ACCEPT success, save context");
+
+ result = BLUETOOTH_ERROR_NONE;
+ _bt_save_invocation_context(context,
+ result, sender, function_name, NULL);
+ } else {
+ g_array_append_vals(*out_param1, &socket_fd, sizeof(int));
+ }
+ break;
+ }