X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=client%2Finput.c;h=d9d2b7b1beefe9ece2e4ead150a50e6cc2ec30f6;hb=9395e7a086359069486e002c02b5777ca0c0df26;hp=97058712828725f7dde27473793969053e98febe;hpb=1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7;p=platform%2Fupstream%2Fconnman.git diff --git a/client/input.c b/client/input.c old mode 100644 new mode 100755 index 9705871..d9d2b7b --- a/client/input.c +++ b/client/input.c @@ -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);