Remove the duplicate check for null 00/166400/1 accepted/tizen/unified/20180112.073141 submit/tizen/20180111.064525
authorYoungHun Kim <yh8004.kim@samsung.com>
Wed, 10 Jan 2018 05:08:29 +0000 (14:08 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Wed, 10 Jan 2018 05:08:31 +0000 (14:08 +0900)
Change-Id: I174a3bb8aab8d0e0826bfc0b197a550deceda344

client/src/muse_client.c
core/src/muse_core.c
packaging/mused.spec
server/include/muse_server_workqueue.h
server/src/muse_server.c
server/src/muse_server_config.c
server/src/muse_server_ipc.c
server/src/muse_server_module.c
server/src/muse_server_workqueue.c

index 5937235..57b1547 100644 (file)
@@ -330,7 +330,7 @@ int muse_client_get_module_index(char *module_name, int *module_index)
                idx++;
        }
 
-       MUSE_FREE(hosts);
+       free(hosts);
 
        iniparser_freedict(mc_dict);
 
index 208dbf5..9d14fa1 100644 (file)
@@ -463,7 +463,7 @@ bool muse_core_msg_deserialize(const char *key, char *buf, int *parse_len, muse_
                        int_data[idx] = json_object_get_int(json_object_array_get_idx(val, idx));
                break;
        default:
-               LOGW("type is not yet implemented");
+               LOGE("The value (%d) of json type is invalid", j_type);
                break;
        }
 
index 9aace8e..c47c0c9 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A multimedia daemon
-Version:    0.3.26
+Version:    0.3.27
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index c041c13..59dd2b9 100644 (file)
@@ -5,8 +5,8 @@
 * See the accompanying LICENSE.txt for details.
 */
 
-#ifndef __MUSE_CORE_WORKQUEUE_H__
-#define __MUSE_CORE_WORKQUEUE_H__
+#ifndef __MUSE_SERVER_WORKQUEUE_H__
+#define __MUSE_SERVER_WORKQUEUE_H__
 
 #ifdef __cplusplus
 extern "C" {
@@ -45,4 +45,4 @@ void ms_workqueue_add_job(ms_workqueue_t *workqueue, ms_workqueue_job_t *job);
 #ifdef __cplusplus
 }
 #endif
-#endif /* __MUSE_CORE_WORKQUEUE_H__ */
+#endif /* __MUSE_SERVER_WORKQUEUE_H__ */
index 1470671..e6a58bb 100644 (file)
@@ -317,7 +317,7 @@ void muse_server_ipc_delete_data(char *data)
 
        raw_data = data - sizeof(muse_recv_data_head_t);
 
-       MUSE_G_FREE(raw_data);
+       g_free(raw_data);
 }
 
 bool muse_server_ipc_get_data_info(char *data, uint64_t *data_id, int *size)
index 8ddd983..b0dc212 100644 (file)
@@ -156,7 +156,7 @@ static int _ms_config_parser(ms_config_t *conf)
 
                host = strtok_r(NULL, INI_PARSER_COMMA, &ptr);
                conf->host_cnt++;
-               MUSE_FREE(key);
+               free(key);
        }
 
        return MM_ERROR_NONE;
index 6618479..508481a 100644 (file)
@@ -365,7 +365,7 @@ gboolean ms_ipc_job_function(ms_workqueue_job_t *job)
                ms_log_process_info(ms_get_instance()->pid);
        }
 
-       MUSE_FREE(job);
+       free(job);
        g_return_val_if_fail(m->ch[MUSE_CHANNEL_MSG].data_thread, FALSE);
 
        LOGD("Leave");
@@ -393,7 +393,7 @@ gboolean ms_ipc_data_job_function(ms_workqueue_job_t *job)
                muse_core_connection_close(m->ch[MUSE_CHANNEL_MSG].sock_fd);
        }
 
-       MUSE_FREE(job);
+       free(job);
        g_return_val_if_fail(m->ch[MUSE_CHANNEL_DATA].data_thread, FALSE);
 
        LOGD("Leave");
index da6fc7c..8c53b22 100644 (file)
@@ -212,7 +212,7 @@ void ms_module_set_dllsym_value(int idx, const char *name, gpointer value)
        if (g_hash_table_lookup_extended(module->dllsym_table, name, &orig_key, NULL)) {
                g_hash_table_remove(module->dllsym_table, name);
                g_hash_table_insert(module->dllsym_table, g_strdup(name), value);
-               MUSE_G_FREE(orig_key);
+               g_free(orig_key);
        } else {
                /* Insert into our hash table it is not a duplicate. */
                g_hash_table_insert(module->dllsym_table, g_strdup(name), value);
index c6f1d88..1fe34cd 100644 (file)
@@ -28,6 +28,8 @@ static void *_ms_workqueue_worker_function(void *ptr)
        ms_workqueue_job_t *job;
        char err_msg[MUSE_MSG_LEN_MAX] = {'\0',};
 
+       g_return_val_if_fail(worker, NULL);
+
        while (1) {
                /* Wait until we get notified. */
                pthread_mutex_lock(&worker->workqueue->jobs_mutex);
@@ -62,7 +64,7 @@ static void *_ms_workqueue_worker_function(void *ptr)
                }
        }
 
-       MUSE_FREE(worker);
+       free(worker);
        pthread_exit(NULL);
 }
 
@@ -86,7 +88,7 @@ void ms_workqueue_init(ms_workqueue_t *workqueue)
                worker->workqueue = workqueue;
                if (pthread_create(&worker->thread, NULL, _ms_workqueue_worker_function, (void *)worker)) {
                        LOGE("Failed to start all worker threads");
-                       MUSE_FREE(worker);
+                       free(worker);
                        return;
                }
                LL_ADD(worker, worker->workqueue->workers);