Remove the gstreamer registry option and resolve the savce issue 49/56149/4 submit/tizen/20160105.053631
authorYoungHun Kim <yh8004.kim@samsung.com>
Tue, 5 Jan 2016 02:12:23 +0000 (11:12 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Tue, 5 Jan 2016 05:32:23 +0000 (14:32 +0900)
Change-Id: I4c25c4cefebed340cc699f8166df84c2064c683a

config/mused.conf
packaging/mused.spec
src/muse_core.c
src/muse_core_log.c
src/muse_core_module.c
src/muse_core_server.c
src/muse_core_tool.c

index 38cd135..1b5e1a3 100644 (file)
@@ -7,8 +7,8 @@ logfile=/var/log/muse.log
 ; parameters for initializing gstreamer
 ; DEFAULT SET (--gst-debug=*:2)
 gstparam1=--gst-debug=*:2
-gstparam2=--gst-disable-registry-update
-gstparam3=--gst-disable-segtrap
+gstparam2=--gst-disable-segtrap
+gstparam3=
 gstparam4=
 gstparam5=
 gstparam6=
index a58cfe2..3376e0e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A Media Daemon library in Tizen Native API
-Version:    0.1.1
+Version:    0.1.2
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 21a127a..9a78f5e 100644 (file)
@@ -102,7 +102,6 @@ static int _muse_core_check_server_is_running(void)
        }
 
        close(fd);
-
        /* Close out the standard file descriptors */
        close(STDIN_FILENO);
        close(STDOUT_FILENO);
@@ -124,7 +123,6 @@ static bool _muse_core_attach_server(int fd, MUSE_MODULE_Callback callback, gpoi
                return false;
 
        g_source_set_callback(src, (GSourceFunc) callback, param, NULL);
-
        g_source_attach(src, g_main_loop_get_context(g_loop));
        g_source_unref(src);
 
@@ -150,8 +148,7 @@ static muse_core_t *_muse_core_create_new_server_from_fd(int fd[], int type)
        g_atomic_int_set(&server->running, 1);
 
        for (i = 0; i < MUSE_CHANNEL_MAX; i++) {
-               if (!_muse_core_attach_server(fd[i],
-                                       _muse_core_connection_handler, (gpointer)(intptr_t) i)) {
+               if (!_muse_core_attach_server(fd[i], _muse_core_connection_handler, (gpointer)(intptr_t) i)) {
                        LOGD("Fail to attach server fd %d", fd[i]);
                        MUSE_FREE(server);
                        return NULL;
@@ -259,7 +256,7 @@ static gboolean _muse_core_connection_handler(GIOChannel *source, GIOCondition c
 
        if (client_sockfd < 0) {
                LOGE("failed to accept");
-               goto out;
+               return FALSE;
        }
 
        if (channel == MUSE_CHANNEL_MSG) {
@@ -289,7 +286,6 @@ static gboolean _muse_core_connection_handler(GIOChannel *source, GIOCondition c
        return TRUE;
 out:
        close(client_sockfd);
-
        MUSE_FREE(module);
        MUSE_FREE(job);
 
index 42de9ee..a5dc959 100644 (file)
@@ -161,6 +161,8 @@ static void _muse_core_log_sigaction(int signo, siginfo_t *si, void *arg)
 
 static int _muse_core_log_open_work(const char *path)
 {
+       if (access(path, F_OK) == 0)
+               unlink(path);
        return open(path, O_CREAT | O_APPEND | O_WRONLY | O_NONBLOCK, 0666);
 }
 
@@ -168,7 +170,7 @@ static void _muse_core_log_create_fd(void)
 {
        int selected_index, index;
        struct stat st;
-       char file[MAX_FILE_NUM][WRITE_DEFAULT_BLOCK_SIZE];
+       char file[MAX_FILE_NUM][TUNABLE_CALLER_DEPTH];
 
        for (index = 0; index < MAX_FILE_NUM; index++)
                snprintf(file[index], strlen(LOGFILE) + 3, "%s.%d", LOGFILE, index);
@@ -178,12 +180,11 @@ static void _muse_core_log_create_fd(void)
                        stat(file[index], &st);
                        g_muse_core_log->size = st.st_size;
                        if (g_muse_core_log->size > MAX_SIZE) {
-                               if (index == MAX_FILE_NUM - 1) {
-                                       unlink(file[0]);
+                               if (index == MAX_FILE_NUM - 1)
                                        selected_index = 0;
-                               } else {
+                               else
                                        selected_index = index + 1;
-                               }
+
                                break;
                        } else {
                                selected_index = index;
index 0a0cea5..6f1443c 100644 (file)
@@ -121,7 +121,7 @@ static void _muse_core_module_set_dllsymbol_value(muse_module_h module, const ch
        g_return_if_fail(module != NULL);
        g_return_if_fail(keyname != NULL);
 
-       g_hash_table_insert(g_muse_core_module->table[module->api_module], keyname, GINT_TO_POINTER(value));
+       g_hash_table_insert(g_muse_core_module->table[module->api_module], g_strdup(keyname), GINT_TO_POINTER(value));
 }
 
 static int _muse_core_module_get_dllsymbol_value(muse_module_h module, const char *keyname, int *value)
index cecdf29..0eccf4d 100644 (file)
@@ -53,7 +53,7 @@ static void _muse_core_server_gst_init(char **cmd)
 
        gst_param_cnt = muse_core_config_get_instance()->get_gst_param_cnt();
        argc = malloc(sizeof(gint));
-       g_return_val_if_fail(argc != NULL, NULL);
+       g_return_if_fail(argc != NULL);
 
        /* add gst_param */
        argv = malloc(sizeof(gchar*) * (gst_param_cnt + 1));
index 30a4f56..9741b32 100644 (file)
@@ -49,12 +49,8 @@ static int _muse_core_tool_getopt(int argc, char **argv, const char *opts)
        register char *cp;
 
        if (si == 1) {
-               if (muse_tool_optind >= argc ||argv[muse_tool_optind][0] != '-' || argv[muse_tool_optind][1] == '\0') {
+               if (muse_tool_optind >= argc ||argv[muse_tool_optind][0] != '-' || argv[muse_tool_optind][1] == '\0')
                        return(EOF);
-               } else if (strncmp(argv[muse_tool_optind], "--", 2) == 0) {
-                       muse_tool_optind++;
-                       return(EOF);
-               }
        }
        muse_tool_optopt = ri = argv[muse_tool_optind][si];
        if (ri == ':' || (cp=strchr(opts, ri)) == NULL) {