- // read UID and return to client\r
- if (workFlags & MAGIC_UID) {\r
- if(!iso14443a_select_card(uid, NULL, &cuid, true, 0)) {\r
- if (MF_DBGLEVEL >= MF_DBG_ERROR) Dbprintf("Can't select card");\r
- OnErrorMagic(MAGIC_UID);\r
+ //loop doesn't loop just breaks out if error\r
+ while (true) {\r
+ // read UID and return to client with write\r
+ if (workFlags & MAGIC_UID) {\r
+ if(!iso14443a_select_card(uid, NULL, &cuid, true, 0)) {\r
+ if (MF_DBGLEVEL >= MF_DBG_ERROR) Dbprintf("Can't select card");\r
+ errormsg = MAGIC_UID;\r
+ // break;\r
+ }\r
+ \r
+ if ( mifare_classic_halt_ex(NULL) ) break;\r