/*
-* Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
+* Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
if (NULL == g_client_list) {
SLOG(LOG_ERROR, TAG_STTD, "[Client Data ERROR] Fail to add new client");
- return -1;
+ return STTD_ERROR_OPERATION_FAILED;
}
#ifdef CLIENT_DATA_DEBUG
int i = 0;
iter = g_slist_nth(g_client_list, 0);
- for (i = 0; i < count; i++) {
+ while (NULL != iter) {
+ if (NULL == iter->data) {
+ count--;
+ iter = g_slist_next(iter);
+ continue;
+ }
+
data = iter->data;
tmp[i] = data->uid;
iter = g_slist_next(iter);
+
+ i++;
}
*uids = tmp;
tmp = __client_get_item(uid);
if (NULL == tmp) {
- SECURE_SLOG(LOG_ERROR, TAG_STTD, "[Client Data ERROR] uid(%d) is NOT valid", uid);
+ SLOG(LOG_ERROR, TAG_STTD, "[Client Data ERROR] uid(%d) is NOT valid", uid);
return STTD_ERROR_INVALID_PARAMETER;
}
tmp = __client_get_item(uid);
if (NULL == tmp) {
- SECURE_SLOG(LOG_ERROR, TAG_STTD, "[Client Data ERROR] uid(%d) is NOT valid", uid);
+ SLOG(LOG_ERROR, TAG_STTD, "[Client Data ERROR] uid(%d) is NOT valid", uid);
return STTD_ERROR_INVALID_PARAMETER;
}
hnd = tmp->data;
return hnd->app_agreed;
-}
\ No newline at end of file
+}