Changeset 3156 for releases

Show
Ignore:
Timestamp:
04/24/07 07:52:31 (21 months ago)
Author:
aj
Message:

use 255/256 bytes as max_send/recv_size by default.

Location:
releases/opensc-0.11.2/src/libopensc
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • releases/opensc-0.11.2/src/libopensc/ctx.c

    r3128 r3156  
    264264        } 
    265265 
    266         driver->max_send_size = SC_APDU_CHOP_SIZE; 
    267         driver->max_recv_size = SC_APDU_CHOP_SIZE; 
     266        driver->max_send_size = SC_DEFAULT_MAX_SEND_SIZE; 
     267        driver->max_recv_size = SC_DEFAULT_MAX_RECV_SIZE; 
    268268        if (conf_block != NULL) { 
    269269                driver->max_send_size = scconf_get_int(conf_block, 
    270                                                 "max_send_size", 
    271                                                 SC_APDU_CHOP_SIZE); 
     270                        "max_send_size", SC_DEFAULT_MAX_SEND_SIZE); 
    272271                driver->max_recv_size = scconf_get_int(conf_block, 
    273                                                 "max_recv_size", 
    274                                                 SC_APDU_CHOP_SIZE); 
     272                        "max_recv_size", SC_DEFAULT_MAX_RECV_SIZE); 
    275273        } 
    276274} 
  • releases/opensc-0.11.2/src/libopensc/opensc.h

    r3128 r3156  
    129129#define SC_MAX_ATR_SIZE                 33 
    130130#define SC_MAX_AID_SIZE                 16 
    131 /* Beware: the following needs to be a multiple of 4 
    132  * or else sc_update_binary will not work on GPK */ 
    133 /* increased to 256 on 2007-03-12 by aj so we have max size by default */ 
    134 #define SC_APDU_CHOP_SIZE               256 
     131 
     132/* default max_send_size/max_recv_size */ 
     133/* GPK rounds down to a multiple of 4, other driver have their own limits */ 
     134#define SC_DEFAULT_MAX_SEND_SIZE        255 
     135#define SC_DEFAULT_MAX_RECV_SIZE        256 
    135136 
    136137#define SC_AC_KEY_REF_NONE      0xFFFFFFFF