Commit 4f92fae1 authored by strk's avatar strk

Don't put lines starting with a space character in the history, to allow...

Don't put lines starting with a space character in the history, to allow hiding password from history file.


git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@274 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 1c0efc71
......@@ -946,9 +946,11 @@ linphonec_main_loop (LinphoneCore * opm, char * sipAddr)
#ifdef HAVE_READLINE
/*
* Only add to history if not already
* last item in it
* last item in it, and only if the command
* doesn't start with a space (to allow for
* hiding passwords)
*/
if ( strcmp(last_in_history, iptr) )
if ( iptr == input && strcmp(last_in_history, iptr) )
{
strncpy(last_in_history,iptr,sizeof(last_in_history));
last_in_history[sizeof(last_in_history)-1]='\0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment