+ if (headerlen > 0) {
+ res = (struct usbtmc_header*)rxbuff;
+
+ if ((res->bTag != sc->usb.bTag) ||
+ (res->bTagInverse != (unsigned char)(~sc->usb.bTag))) {
+ fprintf(stderr, "Wrong TAG received! We: 0x%02x, Scope: 0x%02x\n", sc->usb.bTag, res->bTag);
+ if (sc->usb.brokenRigol == 1) {
+ fprintf(stderr, "Tying to restart transfer...\n");
+ bytes_read = 0;
+ continue;
+ }
+ return 0;
+ }