Changeset 1969
- Timestamp:
- 04/06/10 14:04:17 (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/icc_async.c
r1960 r1969 82 82 case R_SC8in1: 83 83 pthread_mutex_init(&sc8in1, NULL); 84 int pos = strlen(reader->device)-2; //this is where : should be located; is also valid length of physical device name 85 if (reader->device[pos] != 0x3a) //0x3a = ":" 86 cs_log("ERROR: '%c' detected instead of slot separator `:` at second to last position of device %s", reader->device[pos], reader->device); 87 reader->slot=(int)reader->device[pos+1] - 0x30;//FIXME test boundaries 88 reader->device[pos]= 0; //slot 1 reader now gets correct physicalname 84 89 case R_MOUSE: 85 90 reader->handle = open (reader->device, O_RDWR | O_NOCTTY| O_NONBLOCK); -
trunk/csctapi/ifd_sc8in1.c
r1966 r1969 55 55 } 56 56 cs_ddump_mask (D_DEVICE, buff, lenwrite, "IO: Sending: "); 57 if (!write(reader->handle, buff, lenwrite)) { //dont use IO_Serial_Write since mcr commands dont echo back57 if (!write(reader->handle, buff, lenwrite)) { //dont use IO_Serial_Write since mcr commands dont echo back 58 58 cs_log("ERROR: SC8in1 Command write error"); 59 59 return ERROR; … … 151 151 //additional init, Phoenix_Init is also called for Sc8in1 ! 152 152 struct termios termio; 153 int i, speed,fd = reader->handle;153 int i,pos, speed,fd = reader->handle; 154 154 unsigned int is_mcr, sc8in1_clock = 0; 155 155 tcgetattr(reader->handle,&termio); … … 168 168 for (i=0; i<CS_MAXREADER; i++) //copy handle to other slots, FIXME change this if multiple sc8in1 readers 169 169 if (reader[i].typ == R_SC8in1) { 170 if (reader[i].slot == 0) {//not initialized yet 171 pos = strlen(reader[i].device)-2; //this is where : should be located; is also valid length of physical device name 172 if (reader[i].device[pos] != 0x3a) //0x3a = ":" 173 cs_log("ERROR: '%c' detected instead of slot separator `:` at second to last position of device %s", reader[i].device[pos], reader[i].device); 174 reader[i].slot=(int)reader[i].device[pos+1] - 0x30;//FIXME test boundaries 175 reader[i].device[pos]= 0; //slot 1 reader now gets correct physicalname 176 } 170 177 reader[i].handle = fd; 171 178 if (!is_mcr) 172 179 continue; 173 180 //if MCR set clock 174 switch (reader ->mhz) {181 switch (reader[i].mhz) { 175 182 case 357: 176 183 case 358: … … 191 198 break; 192 199 } 193 sc8in1_clock |= (speed << (reader ->slot - 1) * 2);200 sc8in1_clock |= (speed << (reader[i].slot - 1) * 2); 194 201 } 195 buff[0] = 0x63; //MCR set clock 196 buff[1] = (sc8in1_clock >> 8) & 0xFF; 197 buff[2] = sc8in1_clock & 0xFF; 198 sc8in1_command(reader, buff, 3, 0); 199 // } 202 if (is_mcr) { 203 buff[0] = 0x63; //MCR set clock 204 buff[1] = (sc8in1_clock >> 8) & 0xFF; 205 buff[2] = sc8in1_clock & 0xFF; 206 sc8in1_command(reader, buff, 3, 0); 207 } 200 208 201 209 return OK; -
trunk/globals.h
r1968 r1969 871 871 extern int cs_auth_client(struct s_auth *, char*); 872 872 extern void cs_disconnect_client(void); 873 extern int check_ecmcache(ECM_REQUEST *, ulong , int);873 extern int check_ecmcache(ECM_REQUEST *, ulong); 874 874 extern void store_logentry(char *); 875 875 extern int write_to_pipe(int, int, uchar *, int); -
trunk/oscam-reader.c
r1968 r1969 387 387 return; 388 388 } 389 if (check_ecmcache(er, client[er->cidx].grp, reader->cachecm)) 390 { 391 er->rc=2; 392 write_ecm_answer(fd_c2m, er); 393 return; 389 // cache2 390 if (reader->cachecm) { 391 if (check_ecmcache(er, client[er->cidx].grp)) 392 { 393 er->rc=2; 394 write_ecm_answer(fd_c2m, er); 395 return; 396 } 394 397 } 395 398 if (proxy) -
trunk/oscam.c
r1968 r1969 547 547 } 548 548 if (reader[ridx].typ == R_SC8in1 && port == 99) { //SC8in1 reader gets threaded, not forked 549 int pos = strlen(reader[ridx].device)-2; //this is where : should be located; is also valid length of physical device name550 if (reader[ridx].device[pos] != 0x3a) //0x3a = ":"551 cs_log("ERROR: '%c' detected instead of slot separator `:` at second to last position of device %s", reader[ridx].device[pos], reader[ridx].device);552 reader[ridx].slot=(int)reader[ridx].device[pos+1] - 0x30;//FIXME test boundaries553 reader[ridx].device[pos]= 0; //slot 1 reader now gets correct physicalname554 549 if (reader[ridx].handle == 0) 555 550 reader_device_init(&reader[ridx]); … … 1345 1340 } 1346 1341 1347 int check_ecmcache(ECM_REQUEST *er, ulong grp, int cachecm) 1348 { 1349 // disable caching 1350 if (!cachecm) return(0); 1351 1342 int check_ecmcache(ECM_REQUEST *er, ulong grp) 1343 { 1352 1344 int i; 1353 1345 //cs_ddump(ecmd5, CS_ECMSTORESIZE, "ECM search"); … … 2136 2128 2137 2129 // cache1 2138 if (check_ecmcache(er, client[cs_idx].grp, reader[ridx].cachecm)) 2139 er->rc = 1; 2130 if(reader[ridx].cachecm) { 2131 if (check_ecmcache(er, client[cs_idx].grp)) 2132 er->rc = 1; 2133 } 2140 2134 2141 2135 #ifdef CS_ANTICASC
Note:
See TracChangeset
for help on using the changeset viewer.