Changeset 70 for trunk/module-camd33.c

05/12/09 05:25:27 (12 years ago)

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).

1 edited


  • trunk/module-camd33.c

    r8 r70  
    6363  }
    6464  if (client[cs_idx].crypted)
    65     aes_set_key(cfg->c33_key);
     65    aes_set_key((char *) cfg->c33_key);
    6767  mbuf[0]=0;
    7474    {
    7575      usr=mbuf+1;
    76       pwd=usr+strlen(usr)+2;
     76      pwd=usr+strlen((char *)usr)+2;
    7777    }
    7878    else
    8080  }
    8181  for (rc=-1, account=cfg->account; (usr) && (account) && (rc<0); account=account->next)
    82     if ((!strcmp(usr, account->usr)) && (!strcmp(pwd, account->pwd)))
     82    if ((!strcmp((char *)usr, account->usr)) && (!strcmp((char *)pwd, account->pwd)))
    8383      rc=cs_auth_client(account, NULL);
    8484  if (!rc)
Note: See TracChangeset for help on using the changeset viewer.