returning default strings on selection of wrong language
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@481 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -1386,8 +1386,8 @@ static void handle_control (int fd, struct usb_ctrlrequest *setup)
|
|||||||
"... get string %d lang %04x\n",
|
"... get string %d lang %04x\n",
|
||||||
tmp, index);
|
tmp, index);
|
||||||
if (tmp != 0 && index != strings.language) {
|
if (tmp != 0 && index != strings.language) {
|
||||||
fprintf (stderr, "wrong language\n");
|
fprintf (stderr, "wrong language, returning defaults\n");
|
||||||
goto stall;
|
tmp = 0;
|
||||||
}
|
}
|
||||||
memset (buf, 0, 256); /* zero all the bytes */
|
memset (buf, 0, 256); /* zero all the bytes */
|
||||||
result = usb_gadget_get_string (&strings, tmp, buf);
|
result = usb_gadget_get_string (&strings, tmp, buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user