diff --git a/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp b/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp index 9674fc0274788db6f14ffdfbddda482714466789..7256c70eb24479cb00bfe88f1436de582c06a067 100644 --- a/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp +++ b/interfaces/inner_kits/native_cpp/camera_sink/src/distributed_camera_sink_proxy.cpp @@ -195,8 +195,7 @@ int32_t DistributedCameraSinkProxy::ChannelNeg(const std::string& dhId, std::str int32_t DistributedCameraSinkProxy::GetCameraInfo(const std::string& dhId, std::string& cameraInfo) { DHLOGI("DistributedCameraSinkProxy::GetCameraInfo dhId: %s", GetAnonyString(dhId).c_str()); - if (dhId.empty() || dhId.size() > DID_MAX_SIZE || cameraInfo.empty() || - cameraInfo.size() > PARAM_MAX_SIZE) { + if (dhId.empty() || dhId.size() > DID_MAX_SIZE) { DHLOGE("DistributedCameraSinkProxy::GetCameraInfo parmas is invalid"); return DCAMERA_BAD_VALUE; } diff --git a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp index 84f94373196c7ed65c9c8cc5e206161055e39589..69f5549fd6b41ba3fe0a223dbbc9dae9cf60c3bc 100644 --- a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp +++ b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp @@ -564,7 +564,7 @@ void DCameraClient::SetPhotoCaptureLocation(const std::shared_ptrlongitude = item.data.d[longitudeIndex]; location->altitude = item.data.d[altitudeIndex]; photoCaptureSetting->SetLocation(location); - DHLOGI("DCameraClient::SetPhotoCaptureLocation %s photo capture settings set %d location success" , + DHLOGI("DCameraClient::SetPhotoCaptureLocation %s photo capture settings set %d location success", GetAnonyString(cameraId_).c_str(), item.count); } } diff --git a/services/cameraservice/cameraoperator/client/src/listener/dcamera_video_surface_listener_common.cpp b/services/cameraservice/cameraoperator/client/src/listener/dcamera_video_surface_listener_common.cpp index c18db05fed4c13a871c705719e1f274fdf9f6818..d54fd0aef983a67e9fe58ab54ae3cca226088c62 100644 --- a/services/cameraservice/cameraoperator/client/src/listener/dcamera_video_surface_listener_common.cpp +++ b/services/cameraservice/cameraoperator/client/src/listener/dcamera_video_surface_listener_common.cpp @@ -51,7 +51,8 @@ void DCameraVideoSurfaceListener::OnBufferAvailable() int32_t size = width * height * 4; char *address = static_cast(buffer->GetVirAddr()); if ((address == nullptr) || (size <= 0) || (size > SURFACE_BUFFER_MAX_SIZE)) { - DHLOGE("DCameraVideoSurfaceListenerCommon invalid params, width: %d, height: %d, size: %d", width, height, size); + DHLOGE("DCameraVideoSurfaceListenerCommon invalid params, width: %d, height: %d, size: %d", + width, height, size); break; } diff --git a/services/cameraservice/sinkservice/src/distributedcamera/distributed_camera_sink_stub.cpp b/services/cameraservice/sinkservice/src/distributedcamera/distributed_camera_sink_stub.cpp index 385f281f534bfd82b19d3b63dd11f8284ceefd9a..dd4ce423fbf4bd97df39ee77beaf170fa2986cb7 100644 --- a/services/cameraservice/sinkservice/src/distributedcamera/distributed_camera_sink_stub.cpp +++ b/services/cameraservice/sinkservice/src/distributedcamera/distributed_camera_sink_stub.cpp @@ -158,8 +158,7 @@ int32_t DistributedCameraSinkStub::GetCameraInfoInner(MessageParcel &data, Messa do { std::string dhId = data.ReadString(); std::string cameraInfo = data.ReadString(); - if (dhId.empty() || dhId.size() > DID_MAX_SIZE || cameraInfo.empty() || - cameraInfo.size() > PARAM_MAX_SIZE) { + if (dhId.empty() || dhId.size() > DID_MAX_SIZE) { DHLOGE("DistributedCameraSinkStub::GetCameraInfoInner params is invalid"); ret = DCAMERA_BAD_VALUE; break; diff --git a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp index e9b56f4510bfcef8016b7eede2b81df3c0b2f19f..40332a2367a928815c3a764d8beb77252064e660 100644 --- a/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp +++ b/services/cameraservice/sinkservice/test/unittest/common/distributedcamera/distributed_camera_sink_service_test.cpp @@ -37,7 +37,7 @@ public: static std::string g_dhId; static sptr g_service; -std::string g_testParams = ""; +std::string g_testParams = "TestParams"; std::string g_testCameraInfo = ""; std::string g_testChannelInfoContinue = R"({ "Type": "OPERATION", diff --git a/services/cameraservice/sourceservice/src/distributedcameramgr/dcamerahdf/dcamera_provider_callback_impl.cpp b/services/cameraservice/sourceservice/src/distributedcameramgr/dcamerahdf/dcamera_provider_callback_impl.cpp index d292121834f0a78404034d4141bc1fe03b8f7941..35fd240e27a3d71ed304daeafea5f2407498668d 100644 --- a/services/cameraservice/sourceservice/src/distributedcameramgr/dcamerahdf/dcamera_provider_callback_impl.cpp +++ b/services/cameraservice/sourceservice/src/distributedcameramgr/dcamerahdf/dcamera_provider_callback_impl.cpp @@ -88,7 +88,7 @@ int32_t DCameraProviderCallbackImpl::CloseSession(const DHBase& dhBase) bool DCameraProviderCallbackImpl::CheckDHBase(const DHBase& dhBase) { if (dhBase.deviceId_.empty() || dhBase.deviceId_.size() > DID_MAX_SIZE || - dhBase.dhId_.empty() || dhBase.dhId_.size() > DID_MAX_SIZE ) { + dhBase.dhId_.empty() || dhBase.dhId_.size() > DID_MAX_SIZE) { DHLOGE("DCameraProviderCallbackImpl CheckDHBase dhBase is invalid"); return false; }