bitmask = sensor_info->bitmask;
location_info = _uam_to_ua_location_info(device_info);
- ret_if(NULL == location_info);
+ if(NULL == location_info)
+ goto done;
for (l = ua_monitor_list; l; l = g_slist_next(l)) {
ua_monitor_s *monitor = l->data;
account, location_info, device_id);
}
}
+done:
_ua_free_sensor_info(sensor_info);
g_free(location_info);
if (!monitor->service) {
if (service == NULL)
- monitor->service = g_strndup(UA_SERVICE_DEFAULT, UA_MAX_SERVICE_LEN);
+ monitor->service = g_strdup(UA_SERVICE_DEFAULT);
else
- monitor->service = g_strndup(service, UA_MAX_SERVICE_LEN);
+ monitor->service = g_strdup(service);
}
if (UA_ERROR_NONE != _ua_get_error_code(
_uam_get_available_sensors(&available_sensors)))
if (!monitor->service) {
if (service == NULL)
- monitor->service = g_strndup(UA_SERVICE_DEFAULT, UA_MAX_SERVICE_LEN);
+ monitor->service = g_strdup(UA_SERVICE_DEFAULT);
else
- monitor->service = g_strndup(service, UA_MAX_SERVICE_LEN);
+ monitor->service = g_strdup(service);
}
if (UA_ERROR_NONE != _ua_get_error_code(
if (!monitor->service) {
if (service == NULL)
- monitor->service = g_strndup(UA_SERVICE_DEFAULT,
- UA_MAX_SERVICE_LEN);
+ monitor->service = g_strdup(UA_SERVICE_DEFAULT);
else
- monitor->service = g_strndup(service,
- UA_MAX_SERVICE_LEN);
+ monitor->service = g_strdup(service);
}
if (UA_ERROR_NONE != _ua_get_error_code(