Changeset 70 for trunk/reader-seca.c


Ignore:
Timestamp:
05/12/09 05:25:27 (12 years ago)
Author:
rorothetroll
Message:

csctapi/io_serial.c : fix the serial port read/write wait routine to use select instead of poll

This make them compatible with Mac OS X and now oscamd works on OS X. The same code off course
still works on linux and other unix platforms. I let that code ran for 24h before commiting this code.
If you have any issue let me know and I'llr evert to poll for non compatible machines.

all the others : fix all the warning due to sign difference (mostly uchar versus char). This make the code compile

with -Werror on the more strict version of gcc (which is the case on OS X). I also noticed that in a lot of places
the code use a buffer defined as an uchar * ... and use strings functions (strnXXXX) where some memcpy/memcmp .. function
would have been preferable as we're suposedly manipulation a binary buffer. Anyway I fixed all of them and it now compile
without any warning or error on linux and OS X (and also probably on all the other unices but we will have to try before
adding -Werror on the other platform).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/reader-seca.c

    r59 r70  
    137137        return(0);
    138138      else
    139     sprintf(buf+strlen(buf), ",%04lX", b2i(2, &reader[ridx].prid[i][2]));
     139    sprintf((char *) buf+strlen((char *)buf), ",%04lX", b2i(2, &reader[ridx].prid[i][2]));
    140140    }
    141141
     
    177177
    178178//  i=get_prov_index(er->ecm[3],er->ecm[4]);
    179   i=get_prov_index(er->ecm+3);
     179  i=get_prov_index((char *) er->ecm+3);
    180180  if ((i == -1) || (reader[ridx].availkeys[i][0] == 0)) //if provider not found or expired
    181181    return (0);
     
    218218    //first find out prov id
    219219//  i=get_prov_index(ep->emm[3],ep->emm[4]);
    220     i=get_prov_index(ep->emm+3);
     220    i=get_prov_index((char *) ep->emm+3);
    221221    if (i == -1)
    222222        return(0);
     
    252252            //first find out prov id
    253253//          i=get_prov_index(ep->emm[9],ep->emm[10]);
    254             i=get_prov_index(ep->emm+9);
     254            i=get_prov_index((char *) ep->emm+9);
    255255            if (i==-1)
    256256                return(0);
Note: See TracChangeset for help on using the changeset viewer.