Changeset 1948 for trunk/reader-dre.c


Ignore:
Timestamp:
Apr 4, 2010, 11:02:27 AM (10 years ago)
Author:
merek
Message:

Revert last UMP changes as this causes signal 11 and is not realy stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reader-dre.c

    r1946 r1948  
    22#include "reader-common.h"
    33
     4extern uchar cta_res[];
     5extern ushort cta_lr;
    46static uchar provider;
    57static short int mode;
     
    1719}
    1820
    19 static int dre_command (struct s_reader * reader, uchar * cmd, int cmdlen, unsigned char * cta_res, unsigned short * cta_length)    //attention: inputcommand will be changed!!!! answer will be in cta_res, length cta_lr ; returning 1 = no error, return ERROR = err
    20 {
    21   def_resp2;
     21static int dre_command (struct s_reader * reader, uchar * cmd, int cmdlen)  //attention: inputcommand will be changed!!!! answer will be in cta_res, length cta_lr ; returning 1 = no error, return ERROR = err
     22{
    2223  static uchar startcmd[] = { 0x80, 0xFF, 0x10, 0x01, 0x05 };   //any command starts with this,
    2324  //last byte is nr of bytes of the command that will be sent
     
    3940  command[cmdlen++] = checksum;
    4041
    41   reader_cmd2icc (reader, command, cmdlen, cta_res, &cta_lr);
     42  reader_cmd2icc (reader, command, cmdlen);
    4243
    4344  if ((cta_lr != 2) || (cta_res[0] != OK_RESPONSE)) {
     
    4748
    4849  reqans[4] = cta_res[1];   //adapt length byte
    49   reader_cmd2icc (reader, reqans, 5, cta_res, &cta_lr);
     50  reader_cmd2icc (reader, reqans, 5);
    5051
    5152  if (cta_res[0] != CMD_BYTE) {
     
    8990#define dre_cmd(cmd) \
    9091{ \
    91     dre_command(reader, cmd, sizeof(cmd),cta_res,&cta_lr); \
     92    dre_command(reader, cmd, sizeof(cmd)); \
    9293}
    9394
    9495static int dre_set_provider_info (struct s_reader * reader)
    9596{
    96   def_resp;
    9797  int i;
    9898  static uchar cmd59[] = { 0x59, 0x14 };    // subscriptions
     
    139139{
    140140    get_atr;
    141   def_resp;
    142141  static uchar ua[] = { 0x43, 0x15 };   // get serial number (UA)
    143142  static uchar providers[] = { 0x49, 0x15 };    // get providers
     
    257256int dre_do_ecm (struct s_reader * reader, ECM_REQUEST * er)
    258257{
    259   def_resp;
    260258  if (mode == 41) {
    261259    static uchar ecmcmd41[] = { 0x41,
     
    323321int dre_do_emm (struct s_reader * reader, EMM_PACKET * ep)
    324322{
    325   def_resp;
     323
    326324  int emm_length = ((ep->emm[1] & 0x0f) << 8) + ep->emm[2];
    327325
Note: See TracChangeset for help on using the changeset viewer.