int ms_cynara_receive_untrusted_message_thumb(int sockfd, thumbMsg *recv_msg, ms_peer_credentials *credentials)
{
int ret = 0;
- int header_size = 0;
+ unsigned int header_size = 0;
int recv_msg_size = 0;
unsigned char *buf = NULL;
int ms_connect_db(void ***handle, uid_t uid)
{
- int lib_index;
- int ret;
+ int lib_index = 0;
+ int ret = MS_MEDIA_ERR_NONE;
char * err_msg = NULL;
/*Lock mutex for openning db*/
uid_t uid = MEDIA_DEFAULT_UID;
int disc_state = 0;
int end_flag = NORMAL_EVENT;
+ int tem_ret = MS_MEDIA_ERR_NONE;
while (1) {
__msc_set_storage_extract_status(MS_STORAGE_SCAN_DONE);
__msc_pause_extract();
MS_DBG_WARN("extract RESUME");
- int tem_ret = __msc_check_extract_stop_status(extract_data->msg_type, update_path, extract_data->pid, end_flag);
+ tem_ret = __msc_check_extract_stop_status(extract_data->msg_type, update_path, extract_data->pid, end_flag);
if (tem_ret == MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
ms_set_storage_scan_status(handle, extract_data->storage_id, MEDIA_EXTRACT_STOP, uid);
__msc_set_storage_extract_status(MS_STORAGE_SCAN_META_STOP);
int msc_remove_extract_request(const ms_comm_msg_s *recv_msg)
{
+ int i = 0;
+ int j = 0;
+
if (recv_msg == NULL) {
MS_DBG_ERR("recv_msg is null");
return MS_MEDIA_ERR_INVALID_PARAMETER;
}
temp_queue = g_async_queue_new();
- int i = 0;
- for (; i < len; i++) {
+
+ for (i = 0; i < len; i++) {
/*create new queue to compare request*/
msg = g_async_queue_pop(storage_extract_queue);
if ((strcmp(msg->storage_id, storageid) == 0)) {
}
}
len = g_async_queue_length(temp_queue);
- int j = 0;
- for (; j < len; j++) {
+
+ for (j = 0; j < len; j++) {
msg = g_async_queue_pop(temp_queue);
if (msg)
g_async_queue_push(storage_extract_queue, GINT_TO_POINTER(msg));
int pid = 0;
ms_msg_type_e current_msg = MS_MSG_MAX;
uid_t uid = MEDIA_DEFAULT_UID;
+ ms_comm_msg_s *msg_data = NULL;
/*create array for processing overlay data*/
register_array = g_array_new(FALSE, FALSE, sizeof(ms_comm_msg_s *));
MS_SAFE_FREE(register_data);
if (register_array) {
while (register_array->len != 0) {
- ms_comm_msg_s *data = NULL;
- data = g_array_index(register_array , ms_comm_msg_s*, 0);
+ msg_data = g_array_index(register_array , ms_comm_msg_s*, 0);
g_array_remove_index(register_array, 0);
- MS_SAFE_FREE(data);
+ MS_SAFE_FREE(msg_data);
}
g_array_free(register_array, FALSE);
register_array = NULL;
int ret = MS_MEDIA_ERR_NONE;
int pid = 0;
ms_msg_type_e current_msg = MS_MSG_MAX;
+ ms_comm_msg_s *msg_data = NULL;
/*create array for processing overlay data*/
register_array = g_array_new(FALSE, FALSE, sizeof(ms_comm_msg_s *));
MS_SAFE_FREE(register_data);
if (register_array) {
while (register_array->len != 0) {
- ms_comm_msg_s *data = NULL;
- data = g_array_index(register_array , ms_comm_msg_s*, 0);
+ msg_data = g_array_index(register_array , ms_comm_msg_s*, 0);
g_array_remove_index(register_array, 0);
- MS_SAFE_FREE(data);
+ MS_SAFE_FREE(msg_data);
}
g_array_free(register_array, FALSE);
register_array = NULL;