char address[BT_ADDRESS_STRING_SIZE];
char uuid_str[BT_UUID_STRING_SIZE];
int result = BLUETOOTH_ERROR_NONE;
- char name[249] = {0, };
- char path[249] = {0, };
+ char name[BT_NAME_LENGTH_MAX + 1] = {0, };
+ char path[BT_NAME_LENGTH_MAX + 1] = {0, };
int fd;
BT_DBG("+");
_bt_convert_addr_type_to_string(address, auth_event->address.addr);
_bt_service_convert_uuid_type_to_string(uuid_str, auth_event->uuid.uuid);
- memcpy(name, auth_event->name, sizeof(auth_event->name) - 1);
- memcpy(path, auth_event->path, sizeof(auth_event->path) - 1);
+ memcpy(name, auth_event->name, BT_NAME_LENGTH_MAX);
+ memcpy(path, auth_event->path, BT_NAME_LENGTH_MAX);
fd = auth_event->fd;
BT_INFO("Address: %s, UUID: %s, Name: %s, Path: %s, Fd: %d", address, uuid_str, name, path, fd);
_bt_send_event(BT_RFCOMM_SERVER_EVENT,
pending_conn_info->chan = channel;
pending_conn_info->conn_cb = cb;
g_strlcpy(pending_conn_info->address, address, BT_ADDRESS_STRING_SIZE);
- g_strlcpy(pending_conn_info->uuid, remote_uuid, BT_UUID_STRING_SIZE);
+
+ if (remote_uuid != NULL)
+ g_strlcpy(pending_conn_info->uuid, remote_uuid, BT_UUID_STRING_SIZE);
+ else
+ memset(pending_conn_info->uuid, 0x00, BT_UUID_STRING_SIZE);
BT_DBG("-");
return BLUETOOTH_ERROR_NONE;