Changeset 4393
- Timestamp:
- 01/09/11 21:09:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-serial.c
r4383 r4393 151 151 serialdata->oscam_ser_proto=i; 152 152 } 153 if ( (cltype == 'c') && (serialdata->oscam_ser_proto==P_AUTO)) return(0);153 if (!(cltype == 'c') && (serialdata->oscam_ser_proto==P_AUTO)) return(0); 154 154 switch(serialdata->oscam_ser_proto) // set the defaults 155 155 { … … 612 612 oscam_ser_disconnect(); 613 613 serialdata->connected=proto; 614 if( !account ) 615 { 616 cur_client()->account=NULL; 617 for (ok=0, account=cfg->account; (account) && (!ok); account=account->next) 618 if( (ok=!strcmp(serialdata->oscam_ser_usr, account->usr)) ) 619 break; 620 } 614 615 for (ok=0, account=cfg->account; (account) && (!ok); account=account->next) 616 if( (ok=!strcmp(serialdata->oscam_ser_usr, account->usr)) ) 617 break; 621 618 cs_auth_client(cur_client(), ok ? account : (struct s_auth *)(-1), proto_txt[serialdata->connected]); 622 619 } … … 949 946 cl->typ='c'; 950 947 cl->ctyp = pparam->ctyp; 948 cl->account=first_client->account; 951 949 952 950 if(!cl->serialdata) … … 954 952 oscam_init_serialdata(cl->serialdata); 955 953 oscam_copy_serialdata(cl->serialdata, &pparam->serialdata); 954 cs_log("serial: initialized (%s@%s)", cl->serialdata->oscam_ser_proto>P_MAX ? 955 "auto" : proto_txt[cl->serialdata->oscam_ser_proto], cl->serialdata->oscam_ser_device); 956 956 957 pthread_mutex_lock(&mutex); 957 958 bcopy_end = 1; … … 962 963 { 963 964 cl->aureader=NULL; 964 cl->account=NULL;965 965 cl->login=time((time_t *)0); 966 966 cl->pfd=init_oscam_ser_device(cl->serialdata->oscam_ser_device, cl->serialdata->oscam_ser_baud); … … 984 984 char *p; 985 985 pthread_t temp; 986 char cltype = ' \0'; //now auto should work986 char cltype = 'c'; //now auto should work 987 987 if(bcopy_end == -1){ //mutex should be initialized only once 988 988 pthread_mutex_init(&mutex,NULL);
Note:
See TracChangeset
for help on using the changeset viewer.