hostname list
[lttngtop.git] / src / lttngtop.c
index c31b9fd873644f8a3117ce5b001d3b4600a49c23..69a05e15854853fd84fe63bed9d253b519ca5488 100644 (file)
@@ -481,6 +481,7 @@ void init_lttngtop()
        copies = g_ptr_array_new();
        global_perf_liszt = g_hash_table_new(g_str_hash, g_str_equal);
        global_filter_list = g_hash_table_new(g_str_hash, g_str_equal);
+       global_host_list = g_hash_table_new(g_str_hash, g_str_equal);
 
        sem_init(&goodtodisplay, 0, 0);
        sem_init(&goodtoupdate, 0, 1);
@@ -633,14 +634,9 @@ static int parse_options(int argc, char **argv)
                                break;
                        case OPT_HOSTNAME:
                                toggle_filter = 1;
-                               hostname_filter_list = g_hash_table_new(g_str_hash,
-                                               g_str_equal);
                                tmp_str = strtok(opt_hostname, ",");
                                while (tmp_str) {
-                                       char *new_str = strdup(tmp_str);
-                                       g_hash_table_insert(hostname_filter_list,
-                                                       (gpointer) new_str,
-                                                       (gpointer) new_str);
+                                       add_hostname_list(tmp_str, 1);
                                        tmp_str = strtok(NULL, ",");
                                }
                                break;
This page took 0.022532 seconds and 4 git commands to generate.