Minor code cleanup
[lttng-tools.git] / ltt-sessiond / ltt-sessiond.c
index 08d1555a8a45f39148c638236d864ff6a863e6b8..6877acccbef7b8f106685c268679381c714c095f 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
+/*
+ * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -13,7 +14,6 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- * 
  */
 
 #define _GNU_SOURCE
 #include "liblttsessiondcomm.h"
 #include "ltt-sessiond.h"
 
+const char default_home_dir[] = DEFAULT_HOME_DIR;
+const char default_tracing_group[] = DEFAULT_TRACING_GROUP;
+const char default_ust_sock_dir[] = DEFAULT_UST_SOCK_DIR;
+const char default_global_apps_pipe[] = DEFAULT_GLOBAL_APPS_PIPE;
+
 /* Static functions */
 static int set_signal_handler(void);
 static int set_socket_perms(void);
@@ -94,11 +99,11 @@ static void *thread_manage_apps(void *data)
        struct ltt_traceable_app *lta;
 
        /* TODO: Something more elegant is needed but fine for now */
-    struct {
+       struct {
                int reg;        /* 1:register, 0:unregister */
-        pid_t pid;
-        uid_t uid;
-    } reg_msg;
+               pid_t pid;
+               uid_t uid;
+       } reg_msg;
 
        /* Notify all applications to register */
        notify_apps(default_global_apps_pipe);
@@ -595,7 +600,7 @@ static const char *get_home_dir(void)
 {
        const char *home_path;
 
-       if ((home_path = (const char*) getenv("HOME")) == NULL) {
+       if ((home_path = (const char *) getenv("HOME")) == NULL) {
                home_path = default_home_dir;
        }
 
@@ -724,6 +729,7 @@ static void sighandler(int sig)
                case SIGINT:
                case SIGTERM:
                        cleanup();
+                       break;
                default:
                        break;
        }
This page took 0.023691 seconds and 4 git commands to generate.