Changeset 566 for branches

Show
Ignore:
Timestamp:
08/06/04 07:21:33 (4 years ago)
Author:
nils
Message:

apply recent changes from the cvs head

Location:
branches/openct-0.6/src/ifd
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/openct-0.6/src/ifd/ifd-kaan.c

    r513 r566  
    304304{ 
    305305        kaan_status_t   *st = (kaan_status_t *) reader->driver_data; 
    306         unsigned char   buffer[16] = { 0x20, 0x13, slot+1, 0x80, 0x00 }; 
     306        unsigned char   buffer[16] = { 0x20, 0x13, 0x00, 0x80, 0x00 }; 
    307307        unsigned char   *byte; 
    308308        int             rc, n; 
    309309 
     310        buffer[2] = slot+1; 
    310311        ifd_debug(1, "slot=%d", slot); 
    311312        if (!st->frozen 
     
    443444kaan_card_reset(ifd_reader_t *reader, int nslot, void *result, size_t size) 
    444445{ 
    445         unsigned char   cmd[5] = { 0x20, 0x10, nslot+1, 0x01, 0x00 }; 
    446  
     446        unsigned char   cmd[5] = { 0x20, 0x10, 0x00, 0x01, 0x00 }; 
     447 
     448        cmd[2] = nslot + 1; 
    447449        ifd_debug(1, "called."); 
    448450        return kaan_do_reset(reader, nslot, cmd, 5, (unsigned char *) result, size, 0); 
     
    458460{ 
    459461        ct_buf_t        buf; 
    460         unsigned char   buffer[256] = { 0x20, 0x17, slot+1, 0x01, 0x00 }; 
     462        unsigned char   buffer[256] = { 0x20, 0x17, 0x00, 0x01, 0x00 }; 
    461463        int             n; 
    462464 
     465        buffer[2] = slot + 1; 
    463466        /* Build the APDU, which is basically a modified CTBCS OUTPUT command */ 
    464467        ct_buf_init(&buf, buffer, sizeof(buffer)-1); 
     
    483486{ 
    484487        kaan_status_t   *st = (kaan_status_t *) reader->driver_data; 
    485         unsigned char   cmd[] = { 0x80, 0x60, nslot+1, 0x00, 0x03, 0x22, 0x01, 0x00 }; 
     488        unsigned char   cmd[] = { 0x80, 0x60, 0x00, 0x00, 0x03, 0x22, 0x01, 0x00 }; 
    486489        unsigned char   buffer[2]; 
    487490        unsigned short  sw; 
     
    489492        int             rc; 
    490493 
     494        cmd[2] = nslot + 1; 
    491495        ifd_debug(1, "proto=%d", proto); 
    492496 
  • branches/openct-0.6/src/ifd/usb-descriptors.c

    r506 r566  
    229229 
    230230  memcpy(config, buffer, IFD_USB_DT_CONFIG_SIZE); 
     231  IFD_USB_LE16_TO_CPU(config->wTotalLength); 
    231232  size = config->wTotalLength; 
    232233