diff --git a/client/scripting.c b/client/scripting.c index 57e6cd71..0c761cb2 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -102,37 +102,6 @@ static int l_WaitForResponseTimeout(lua_State *L){ if(WaitForResponseTimeout(cmd, &response, ms_timeout)) { - /* Uncomment code below to print the bytes which were received from the C code before they get passed to Lua. */ - // uint8_t *recv; - // char *hexout; - // recv = response.d.asBytes; - // uint8_t iLen = response.arg[0]; - // if (0){ - // iLen = response.arg[1]; - // if (iLen){ - // PrintAndLog("Card selected. UID[%i]:", iLen); - // } else { - // PrintAndLog("Can't select card."); - // } - // } else { - // PrintAndLog("received %i bytes:", iLen); - // } - // if(!iLen) - // return 1; - // hexout = (char *)malloc(iLen * 3 + 1); - // if (hexout != NULL) { - // for (int i = 0; i < iLen; i++) { // data in hex - // sprintf(&hexout[i * 3], "%02X ", recv[i]); - // } - // PrintAndLog("%s", hexout); - // free(hexout); - // } else { - // PrintAndLog("malloc failed your client has low memory?"); - // return 2; - // } - // printf("Command response just sent back to Lua script with the bytes which were just printed.\n"); - - //Push it as a string lua_pushlstring(L,(const char *)&response,sizeof(UsbCommand)); @@ -140,7 +109,6 @@ static int l_WaitForResponseTimeout(lua_State *L){ }else{ //Push a Nil instead lua_pushnil(L); - printf("Nil pushed back to Lua script - no response received.\n"); return 1;// one return value } }