svc->service = g_strdup(svc_name);
svc->payload = g_new0(uam_db_payload_info_t, 1);
- if (payload_info) {
+ if (payload_info)
__uam_copy_uam_payload_info(svc->payload, payload_info);
- }
svc_devs = g_slist_append(svc_devs, svc);
}
if (last_seen > 0)
svc->last_seen = last_seen;
- if (payload_info) {
- /* TODO free existing payload structure */
+ /* TODO free existing payload structure */
+ if (payload_info)
__uam_copy_uam_payload_info(svc->payload, payload_info);
- }
UAM_DBG("Service [%s] device [%s] tech_type [%d] discriminant [%d] " \
"last_seen [%llu] payload primary key [%d] app number [%d]",
retv_if(NULL == svc_name, UAM_ERROR_INVALID_PARAMETER);
l = g_slist_find_custom(services, svc_name, __compare_svc_name);
- if (!l) {
+ if (!l)
UAM_ERR("Service not found");
- }
+
retv_if(NULL == l, UAM_ERROR_NOT_FOUND);
retv_if(NULL == l->data, UAM_ERROR_INTERNAL);
__get_default_service_name(dev_info->app_num, &default_service_name);
l = g_slist_find_custom(services, default_service_name, __compare_svc_name);
- if (!l) {
+ if (!l)
UAM_WARN("Default service not found");
- } else {
+ else
service = l->data;
- }
/** updates for svc dev*/
ret = _uam_core_update_svc_dev_info(dev_info->device_id, dev_info->type,
retv_if(!addr, UAM_ERROR_INVALID_PARAMETER);
retv_if(!dev_info, UAM_ERROR_INVALID_PARAMETER);
- switch(addr->addr_type) {
+ switch (addr->addr_type) {
case UAM_ADDR_TYPE_IPv4:
if (strcasecmp(addr->address, dev_info->ipv4_addr)) {
UAM_DBG("Old IPv4: %s, New IPv4: %s",
static gboolean __uam_manager_terminate_idle_cb(gpointer user_data)
{
- FUNC_ENTRY;
+ FUNC_ENTRY;
- __uam_manager_cleanup();
+ __uam_manager_cleanup();
- UAM_INFO("Quit g_main loop");
+ UAM_INFO("Quit g_main loop");
- if (main_loop)
- g_main_loop_quit(main_loop);
+ if (main_loop)
+ g_main_loop_quit(main_loop);
- UAM_INFO("ua-manager terminated");
+ UAM_INFO("ua-manager terminated");
- FUNC_EXIT;
+ FUNC_EXIT;
- return FALSE;
+ return FALSE;
}
void _uam_manager_terminate(void)