// Covert MSF-API's Service into D2D Flow's Device n Service
conv::SmartViewDevice* conv_device = convertIntoConvDevice(service);
- IF_FAIL_RETURN_TAG((conv_device != NULL), CONV_ERROR_INVALID_PARAMETER, _E, "failed to convert into flow device..");
+ if (conv_device == NULL) {
+ _E("failed to convert into flow device..");
+ return CONV_ERROR_INVALID_PARAMETER;
+ }
conv::SmartViewService* conv_service = convertIntoConvService(service);
if (conv_service == NULL) {
- delete conv_device;
+ _E("failed to convert into flow service..");
+ if (conv_device != NULL) {
+ delete conv_device;
+ }
+ return CONV_ERROR_INVALID_PARAMETER;
}
- IF_FAIL_RETURN_TAG((conv_service != NULL), CONV_ERROR_INVALID_PARAMETER, _E, "failed to convert into flow service..");
+
conv_device->addService(conv_service);
_D("Success in converting into flow.service[%x] .device[%x]", conv_service, conv_device);