[connman] Added Tizen Wi-Fi Mesh
[platform/upstream/connman.git] / client / input.c
old mode 100644 (file)
new mode 100755 (executable)
index 9705871..d9d2b7b
@@ -103,8 +103,9 @@ static void rl_handler(char *input)
        }
 
        if (len > 0) {
-
-               add_history(input);
+               HIST_ENTRY *previous = history_get(where_history());
+               if(!previous || strcmp(previous->line, input))
+                       add_history(input);
 
                err = __connmanctl_commands(connection, trim_args, len);
 
@@ -114,6 +115,7 @@ static void rl_handler(char *input)
 
        g_strfreev(args);
        g_free(trim_args);
+       free(input);
 }
 
 static gboolean input_handler(GIOChannel *channel, GIOCondition condition,
@@ -271,7 +273,9 @@ int __connmanctl_input_init(int argc, char *argv[])
                __connmanctl_monitor_completions(NULL);
 
                rl_callback_handler_remove();
+#if !defined TIZEN_EXT
                rl_message("");
+#endif
        }
 
        dbus_connection_unref(connection);