From 8a7274ec344be44588e33c7c704d3afa1bed7e87 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 4 Oct 2019 09:30:36 +0200 Subject: [PATCH] offline: avoid spurious "Sending bytes to proxmark failed" on exit --- client/proxmark3.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/proxmark3.c b/client/proxmark3.c index f28e14063..a2d4ebd72 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -261,9 +261,11 @@ check_script: } } // end while - clearCommandBuffer(); - SendCommandNG(CMD_QUIT_SESSION, NULL, 0); - msleep(100); // Make sure command is sent before killing client + if (session.pm3_present) { + clearCommandBuffer(); + SendCommandNG(CMD_QUIT_SESSION, NULL, 0); + msleep(100); // Make sure command is sent before killing client + } while (current_cmdscriptfile()) pop_cmdscriptfile();