1 From 346965149827844aa5a5f06ab155787e54a70e30 Mon Sep 17 00:00:00 2001
2 From: Jeffrey C. Ollie <jeff@ocjtech.us>
3 Date: Mon, 8 Mar 2010 12:38:56 -0600
4 Subject: [PATCH 2/2] Use the library function for loading command history rather than
8 main/asterisk.c | 21 ++-------------------
9 1 files changed, 2 insertions(+), 19 deletions(-)
11 diff --git a/main/asterisk.c b/main/asterisk.c
12 index e27f685..b8176c5 100644
15 @@ -2567,29 +2567,12 @@ static int ast_el_write_history(char *filename)
17 static int ast_el_read_history(char *filename)
19 - char buf[MAX_HISTORY_COMMAND_LENGTH];
24 if (el_hist == NULL || el == NULL)
27 - if ((f = fopen(filename, "r")) == NULL)
31 - if (!fgets(buf, sizeof(buf), f))
33 - if (!strcmp(buf, "_HiStOrY_V2_\n"))
35 - if (ast_all_zeros(buf))
37 - if ((ret = ast_el_add_history(buf)) == -1)
43 + return (history(el_hist, &ev, H_LOAD, filename));
46 static void ast_remotecontrol(char *data)