[asterisk-commits] kmoore: branch kmoore/microfilm r397416 - in /team/kmoore/microfilm: ./ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 22 07:54:23 CDT 2013
Author: kmoore
Date: Thu Aug 22 07:54:21 2013
New Revision: 397416
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397416
Log:
Bring up to current
Modified:
team/kmoore/microfilm/ (props changed)
team/kmoore/microfilm/main/asterisk.c
Propchange: team/kmoore/microfilm/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 22 07:54:21 2013
@@ -1,1 +1,1 @@
-/trunk:1-397382
+/trunk:1-397415
Modified: team/kmoore/microfilm/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/microfilm/main/asterisk.c?view=diff&rev=397416&r1=397415&r2=397416
==============================================================================
--- team/kmoore/microfilm/main/asterisk.c (original)
+++ team/kmoore/microfilm/main/asterisk.c Thu Aug 22 07:54:21 2013
@@ -3021,12 +3021,23 @@
static int ast_el_add_history(char *buf)
{
HistEvent ev;
-
- if (el_hist == NULL || el == NULL)
+ char *stripped_buf;
+
+ if (el_hist == NULL || el == NULL) {
ast_el_initialize();
- if (strlen(buf) > (MAX_HISTORY_COMMAND_LENGTH - 1))
+ }
+ if (strlen(buf) > (MAX_HISTORY_COMMAND_LENGTH - 1)) {
return 0;
- return (history(el_hist, &ev, H_ENTER, ast_strip(ast_strdupa(buf))));
+ }
+
+ stripped_buf = ast_strip(ast_strdupa(buf));
+
+ /* HISTCONTROL=ignoredups */
+ if (!history(el_hist, &ev, H_FIRST) && strcmp(ev.str, stripped_buf) == 0) {
+ return 0;
+ }
+
+ return history(el_hist, &ev, H_ENTER, stripped_buf);
}
static int ast_el_write_history(char *filename)
More information about the asterisk-commits
mailing list