mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-25 07:35:40 -07:00
De-redundancy
This commit is contained in:
parent
457483eafe
commit
7c921c1e6e
1 changed files with 0 additions and 12 deletions
|
@ -127,15 +127,6 @@ static void prompt_compose(char *buf, size_t buflen, const char *promptctx, cons
|
||||||
static int check_comm(void) {
|
static int check_comm(void) {
|
||||||
// If communications thread goes down. Device disconnected then this should hook up PM3 again.
|
// If communications thread goes down. Device disconnected then this should hook up PM3 again.
|
||||||
if (IsCommunicationThreadDead() && session.pm3_present) {
|
if (IsCommunicationThreadDead() && session.pm3_present) {
|
||||||
#ifdef HAVE_READLINE
|
|
||||||
char* saved_line;
|
|
||||||
int saved_point;
|
|
||||||
saved_point = rl_point;
|
|
||||||
saved_line = rl_copy_text(0, rl_end);
|
|
||||||
rl_set_prompt("");
|
|
||||||
rl_replace_line("", 0);
|
|
||||||
rl_redisplay();
|
|
||||||
#endif
|
|
||||||
PrintAndLogEx(INFO, "Running in " _YELLOW_("OFFLINE") " mode. Use "_YELLOW_("\"hw connect\"") " to reconnect\n");
|
PrintAndLogEx(INFO, "Running in " _YELLOW_("OFFLINE") " mode. Use "_YELLOW_("\"hw connect\"") " to reconnect\n");
|
||||||
prompt_dev = PROXPROMPT_DEV_OFFLINE;
|
prompt_dev = PROXPROMPT_DEV_OFFLINE;
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
|
@ -144,10 +135,7 @@ static int check_comm(void) {
|
||||||
char prompt_filtered[PROXPROMPT_MAX_SIZE] = {0};
|
char prompt_filtered[PROXPROMPT_MAX_SIZE] = {0};
|
||||||
memcpy_filter_ansi(prompt_filtered, prompt, sizeof(prompt_filtered), !session.supports_colors);
|
memcpy_filter_ansi(prompt_filtered, prompt, sizeof(prompt_filtered), !session.supports_colors);
|
||||||
rl_set_prompt(prompt_filtered);
|
rl_set_prompt(prompt_filtered);
|
||||||
rl_replace_line(saved_line, 0);
|
|
||||||
rl_point = saved_point;
|
|
||||||
rl_redisplay();
|
rl_redisplay();
|
||||||
free(saved_line);
|
|
||||||
#endif
|
#endif
|
||||||
CloseProxmark(session.current_device);
|
CloseProxmark(session.current_device);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue