Ignore:
Timestamp:
01/14/10 19:07:30 (13 years ago)
Author:
alno
Message:

WebIf:

  • Command: Merging revisions 1212-1227 of trunk
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/csctapi/protocol_t0.c

    r1210 r1228  
    121121    /* WWT = 960 * WI * (Fi / f) * 1000 milliseconds */
    122122    double F =  (double) atr_f_table[params->FI];
    123     t0->wwt = (long unsigned int) (960 * wi * (F / ICC_Async_GetClockRate (t0->icc)) * 1000);
     123    t0->wwt = (long unsigned int) (960 * wi * (F / ICC_Async_GetClockRate ()) * 1000);
    124124   
    125125    /* Set timings */
     
    132132   
    133133#ifdef DEBUG_PROTOCOL
    134     printf ("Protocol: T=0: WWT=%d, Clockrate=%lu\n", (int)(t0->wwt),ICC_Async_GetClockRate(t0->icc));
     134    printf ("Protocol: T=0: WWT=%d, Clockrate=%lu\n", (int)(t0->wwt),ICC_Async_GetClockRate());
    135135#endif
    136136   
     
    157157    /* WWT = 960 * WI * (Fi / f) * 1000 milliseconds */
    158158    double F =  (double) atr_f_table[params->FI];
    159     t14->wwt = (long unsigned int) (960 * wi * (F / ICC_Async_GetClockRate (t14->icc)) * 1000);
     159    t14->wwt = (long unsigned int) (960 * wi * (F / ICC_Async_GetClockRate ()) * 1000);
    160160    t14->wwt >>= 1;
    161161   
     
    827827        return PROTOCOL_T0_ERROR;
    828828   
    829     /* Initialise transmission */
    830     if (ICC_Async_BeginTransmission (t0->icc) != ICC_ASYNC_OK)
    831     {
    832         (*rsp) = NULL;
    833         return PROTOCOL_T0_ICC_ERROR;
    834     }
    835    
    836829    /* Send header bytes */
    837830    if (ICC_Async_Transmit (t0->icc, 5, APDU_Cmd_Header (cmd)) != ICC_ASYNC_OK)
    838831    {
    839         ICC_Async_EndTransmission (t0->icc);
    840        
    841832        (*rsp) = NULL;
    842833        return PROTOCOL_T0_ICC_ERROR;
     
    985976        (*rsp) = NULL;
    986977   
    987     /* End of transmission */
    988     if (ICC_Async_EndTransmission (t0->icc) != ICC_ASYNC_OK)
    989         return PROTOCOL_T0_ICC_ERROR;
    990    
    991978    return (ret);
    992979}
     
    10141001        return PROTOCOL_T14_ERROR;
    10151002   
    1016     /* Initialise transmission */
    1017     if (ICC_Async_BeginTransmission (t14->icc) != ICC_ASYNC_OK)
    1018     {
    1019         (*rsp) = NULL;
    1020         return PROTOCOL_T14_ICC_ERROR;
    1021     }
    1022    
    10231003    if(t14->icc->ifd->io->reader_type!=R_INTERNAL)
    10241004    {
     
    10261006        if (ICC_Async_Transmit (t14->icc, 1, &b1) != ICC_ASYNC_OK)
    10271007        {
    1028             ICC_Async_EndTransmission (t14->icc);
    1029            
    10301008            (*rsp) = NULL;
    10311009            return PROTOCOL_T14_ICC_ERROR;
     
    10351013        if (ICC_Async_Transmit (t14->icc, cmd_len, cmd_raw) != ICC_ASYNC_OK)
    10361014        {
    1037             ICC_Async_EndTransmission (t14->icc);
    1038            
    10391015            (*rsp) = NULL;
    10401016            return PROTOCOL_T14_ICC_ERROR;
     
    10441020        if (ICC_Async_Transmit (t14->icc, 1, &ixor) != ICC_ASYNC_OK)
    10451021        {
    1046             ICC_Async_EndTransmission (t14->icc);
    1047            
    10481022            (*rsp) = NULL;
    10491023            return PROTOCOL_T14_ICC_ERROR;
     
    10591033        if (ICC_Async_Transmit (t14->icc, cmd_len+2, buffer) != ICC_ASYNC_OK)
    10601034        {
    1061             ICC_Async_EndTransmission (t14->icc);
    1062            
    10631035            (*rsp) = NULL;
    10641036            return PROTOCOL_T14_ICC_ERROR;
     
    11471119    }
    11481120   
    1149     /* End of transmission */
    1150     if (ICC_Async_EndTransmission (t14->icc) != ICC_ASYNC_OK)
    1151         return PROTOCOL_T14_ICC_ERROR;
    1152    
    11531121    return (ret);
    11541122}
Note: See TracChangeset for help on using the changeset viewer.