<commit_before>/*
    ccid_usb.c: USB access routines using the libusb library
    Copyright (C) 2003   <NAME>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/*
 * $Id$
 */

#define __CCID_USB__

#include <stdio.h>
#include <string.h> 
#include <errno.h>
#include <usb.h>

#include "pcscdefines.h"
#include "config.h"
#include "debug.h"
#include "utils.h"
#include "parser.h"


//#define USB_TIMEOUT 60000	/* 1 minute timeout */
#define USB_TIMEOUT 1000	/* 1 second timeout */

#define BUS_DEVICE_STRSIZE 32

typedef struct
{
	usb_dev_handle *handle;
	struct usb_device *dev;

	/*
	 * Used to store device name string %s/%s like:
	 * 001/002 (Linux)
	 * /dev/usb0//dev/ (FreeBSD)
	 * /dev/usb0//dev/ugen0 (OpenBSD)
	 */
	char device_name[BUS_DEVICE_STRSIZE];

	/*
	 * CCID Sequence number
	 */
	int bSeq;

	/*
	 * Endpoints
	 */
	int bulk_in;
	int bulk_out;
} _usbDevice;<commit_msg>use a 1 minute USB timeout instead of the 1 second used for debug<commit_after>/*
    ccid_usb.c: USB access routines using the libusb library
    Copyright (C) 2003   <NAME>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/*
 * $Id$
 */

#define __CCID_USB__

#include <stdio.h>
#include <string.h> 
#include <errno.h>
#include <usb.h>

#include "pcscdefines.h"
#include "config.h"
#include "debug.h"
#include "utils.h"
#include "parser.h"


#define USB_TIMEOUT 60000	/* 1 minute timeout */

#define BUS_DEVICE_STRSIZE 32

typedef struct
{
	usb_dev_handle *handle;
	struct usb_device *dev;

	/*
	 * Used to store device name string %s/%s like:
	 * 001/002 (Linux)
	 * /dev/usb0//dev/ (FreeBSD)
	 * /dev/usb0//dev/ugen0 (OpenBSD)
	 */
	char device_name[BUS_DEVICE_STRSIZE];

	/*
	 * CCID Sequence number
	 */
	int bSeq;

	/*
	 * Endpoints
	 */
	int bulk_in;
	int bulk_out;
} _usbDevice;
{'fraction_non_alphanumeric': 0.08866837387964148, 'fraction_numerical': 0.02528809218950064, 'mean_word_length': 3.3044077134986227, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2704391', 'n_tokens_mistral': 1073, 'n_tokens_neox': 965, 'n_words': 398}