]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Fixed error pointed out here: https://code.google.com/p/proxmark3/issues/detail?id...
authormartin.holst@gmail.com <martin.holst@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Mon, 3 Jun 2013 11:04:35 +0000 (11:04 +0000)
committermartin.holst@gmail.com <martin.holst@gmail.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Mon, 3 Jun 2013 11:04:35 +0000 (11:04 +0000)
client/cmdmain.c

index 7f34d54396b690963d78fd71926d7c68ae817124..85a0e0ca2d7820f56e3d7d9b383ffa4d15fe5d6f 100644 (file)
@@ -26,9 +26,9 @@
 #include "util.h"
 
 unsigned int current_command = CMD_UNKNOWN;
-unsigned int received_command = CMD_UNKNOWN;
-UsbCommand current_response;
-UsbCommand current_response_user;
+//unsigned int received_command = CMD_UNKNOWN;
+//UsbCommand current_response;
+//UsbCommand current_response_user;
 
 static int CmdHelp(const char *Cmd);
 static int CmdQuit(const char *Cmd);
@@ -74,6 +74,11 @@ int CmdQuit(const char *Cmd)
  * @return true if command was returned, otherwise false
  */
 bool WaitForResponseTimeout(uint32_t cmd, UsbCommand* response, size_t ms_timeout) {
+  
+  if (response == NULL) {
+    UsbCommand resp;
+    response = &resp;
+  }
 
   // Wait until the command is received
   for(size_t dm_seconds=0; dm_seconds < ms_timeout/10; dm_seconds++) {
@@ -175,6 +180,7 @@ void UsbCommandReceived(UsbCommand *UC)
 
     default: {
       // Maybe it's a response
+      /*
       switch(current_command) {
         case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K: {
           if (UC->cmd != CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K) {
@@ -186,13 +192,14 @@ void UsbCommandReceived(UsbCommand *UC)
           memcpy(sample_buf+UC->arg[0],UC->d.asBytes,48);
           sample_buf_len += 48;
 //          for(i=0; i<48; i++) sample_buf[i] = UC->d.asBytes[i];
-          received_command = UC->cmd;
+          //received_command = UC->cmd;
         } break;
 
         default: {
         } break;
-      }
-    } break;
+      }*/
+    }
+      break;
   }
 
   storeCommand(UC);
Impressum, Datenschutz