mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 08:49:59 +00:00
commit
181d555c08
@ -355,13 +355,6 @@ static void BleNotifyDeviceConnectResult(const ConnBleDevice *device, ConnBleCon
|
||||
}
|
||||
return;
|
||||
}
|
||||
UpdateOption option = {
|
||||
.type = CONNECT_BLE,
|
||||
.bleOption = {
|
||||
.priority = CONN_BLE_PRIORITY_BALANCED,
|
||||
}
|
||||
};
|
||||
BleUpdateConnection(connection->connectionId, &option);
|
||||
|
||||
ConnectionInfo info = { 0 };
|
||||
int32_t status = BleConvert2ConnectionInfo(connection, &info);
|
||||
@ -686,6 +679,13 @@ static void BleClientConnected(uint32_t connectionId)
|
||||
return;
|
||||
}
|
||||
ConnRemoveMsgFromLooper(&g_bleManagerSyncHandler, BLE_MGR_MSG_CONNECT_TIMEOUT, connectionId, 0, NULL);
|
||||
UpdateOption option = {
|
||||
.type = CONNECT_BLE,
|
||||
.bleOption = {
|
||||
.priority = CONN_BLE_PRIORITY_BALANCED,
|
||||
}
|
||||
};
|
||||
BleUpdateConnection(connectionId, &option);
|
||||
CONN_LOGI(
|
||||
CONN_BLE, "ble client connect success, clientId=%{public}d, addr=%{public}s", connectionId, anomizeAddress);
|
||||
connection->underlayerFastConnectFailedScanFailure = false;
|
||||
@ -1594,6 +1594,7 @@ static void DataReceivedFunc(SoftBusMessage *msg)
|
||||
{
|
||||
CONN_CHECK_AND_RETURN_LOGW(msg->obj != NULL, CONN_BLE, "obj is null");
|
||||
ConnBleDataReceivedContext *ctx = (ConnBleDataReceivedContext *)msg->obj;
|
||||
CONN_CHECK_AND_RETURN_LOGW(ctx->data != NULL, CONN_BLE, "data is null");
|
||||
if (g_bleManager.state->dataReceived == NULL) {
|
||||
SoftBusFree(ctx->data);
|
||||
return;
|
||||
|
@ -1141,6 +1141,7 @@ static void DataReceivedFunc(SoftBusMessage *msg)
|
||||
{
|
||||
CONN_CHECK_AND_RETURN_LOGW(msg->obj != NULL, CONN_BR, "obj is null");
|
||||
ConnBrDataReceivedContext *ctx = (ConnBrDataReceivedContext *)msg->obj;
|
||||
CONN_CHECK_AND_RETURN_LOGW(ctx->data != NULL, CONN_BR, "data is null");
|
||||
if (g_brManager.state->dataReceived == NULL) {
|
||||
SoftBusFree(ctx->data);
|
||||
return;
|
||||
|
@ -374,9 +374,9 @@ HWTEST_F(ConnectionBrConnectionTest, BrManagerTest008, TestSize.Level1)
|
||||
LocalListenerInfo *info = (LocalListenerInfo *)SoftBusCalloc(sizeof(LocalListenerInfo));
|
||||
ASSERT_NE(nullptr, info);
|
||||
info->type = CONNECT_BR;
|
||||
EXPECT_CALL(brMock, SoftBusThreadCreate).WillOnce(Return(SOFTBUS_ERR));
|
||||
EXPECT_CALL(brMock, SoftBusThreadCreate).WillOnce(Return(SOFTBUS_INVALID_PARAM));
|
||||
int32_t ret = g_connectFuncInterface->StartLocalListening(info);
|
||||
EXPECT_EQ(SOFTBUS_ERR, ret);
|
||||
EXPECT_EQ(SOFTBUS_INVALID_PARAM, ret);
|
||||
|
||||
EXPECT_CALL(brMock, SoftBusThreadCreate).WillOnce(Return(SOFTBUS_OK));
|
||||
ret = g_connectFuncInterface->StartLocalListening(info);
|
||||
|
Loading…
Reference in New Issue
Block a user