Changeset 6323
- Timestamp:
- 01/30/12 09:22:08 (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r6319 r6323 2089 2089 } 2090 2090 } 2091 #ifdef CCCSHARE2091 #ifdef MODULE_CCCSHARE 2092 2092 //Check Ident filter: 2093 2093 if (card) { … … 2868 2868 } 2869 2869 2870 #ifdef MODULE_CCCSHARE 2870 2871 /** 2871 2872 * Starting readers to get cards: … … 3099 3100 3100 3101 cs_debug_mask(D_TRACE, "ccc send cards %s", usr); 3101 #ifdef CCCSHARE3102 3102 if (!cc_srv_report_cards(cl)) 3103 3103 return -1; 3104 #endif3105 3104 cs_ftime(&cc->ecm_time); 3106 3105 … … 3135 3134 return NULL; 3136 3135 } 3136 #endif 3137 3137 3138 3138 int32_t cc_cli_connect(struct s_client *cl) { … … 3453 3453 } 3454 3454 3455 #ifdef MODULE_CCCSHARE 3455 3456 static void cc_s_idle(struct s_client *cl) { 3456 3457 cs_debug_mask(D_TRACE, "ccc idle %s", username(cl)); … … 3463 3464 } 3464 3465 } 3466 #endif 3465 3467 3466 3468 void module_cccam(struct s_module *ph) { … … 3468 3470 ph->type = MOD_CONN_TCP; 3469 3471 ph->listenertype = LIS_CCCAM; 3472 ph->num = R_CCCAM; 3470 3473 ph->logtxt = ", crypted"; 3471 3474 ph->recv = cc_recv; … … 3478 3481 ph->c_send_ecm = cc_send_ecm; 3479 3482 ph->c_send_emm = cc_send_emm; 3483 #ifdef MODULE_CCCSHARE 3480 3484 ph->s_ip = cfg.cc_srvip; 3481 3485 ph->s_handler = cc_srv_init; … … 3483 3487 ph->s_idle = cc_s_idle; 3484 3488 ph->send_dcw = cc_send_dcw; 3489 #endif 3485 3490 ph->c_available = cc_available; 3486 3491 ph->c_card_info = cc_card_info; … … 3488 3493 ph->c_cache_push=cc_cache_push_out; 3489 3494 #endif 3495 3496 cc_update_nodeid(); 3497 3498 #ifdef MODULE_CCCSHARE 3490 3499 static PTAB ptab; //since there is always only 1 cccam server running, this is threadsafe 3491 3500 memset(&ptab, 0, sizeof(PTAB)); … … 3498 3507 3499 3508 ph->ptab = &ptab; 3500 ph->num = R_CCCAM; 3501 3502 cc_update_nodeid(); 3503 #ifdef CCCSHARE 3509 3504 3510 if (cfg.cc_port[0]) 3505 3511 init_share(); -
trunk/module-cccshare.h
r6279 r6323 1 1 #include "globals.h" 2 2 #ifdef MODULE_CCCAM 3 #ifdef MODULE_CCCSHARE 3 4 /* 4 5 * module-cccshare.h … … 46 47 #endif /* MODULECCCSHARE_H_ */ 47 48 #endif 49 #endif -
trunk/oscam-config.c
r6309 r6323 1763 1763 fclose(fp); 1764 1764 1765 if ( cfg.logfile == NULL&& cfg.logtostdout == 0 && cfg.logtosyslog == 0) {1765 if (!cfg.logfile && cfg.logtostdout == 0 && cfg.logtosyslog == 0) { 1766 1766 if(cs_malloc(&(cfg.logfile), strlen(CS_LOGFILE) + 1, -1)) 1767 1767 memcpy(cfg.logfile, CS_LOGFILE, strlen(CS_LOGFILE) + 1); … … 2146 2146 if (cfg.mailfile != NULL || cfg.http_full_cfg) 2147 2147 fprintf_conf(f, "mailfile", "%s\n", cfg.mailfile?cfg.mailfile:""); 2148 if (cfg.logfile != NULL|| cfg.logtostdout == 1 || cfg.logtosyslog == 1 || cfg.http_full_cfg){2148 if (cfg.logfile || cfg.logtostdout == 1 || cfg.logtosyslog == 1 || cfg.http_full_cfg){ 2149 2149 value = mk_t_logfile(); 2150 2150 fprintf_conf(f, "logfile", "%s\n", value); … … 5568 5568 if(cfg.logtostdout == 1) needed += 7; 5569 5569 if(cfg.logtosyslog == 1) needed += 7; 5570 if(cfg.logfile != NULL) needed += strlen(cfg.logfile);5570 if(cfg.logfile) needed += strlen(cfg.logfile); 5571 5571 if(needed == 1 || !cs_malloc(&value, needed * sizeof(char), -1)) return ""; 5572 5572 … … 5579 5579 dot = ";"; 5580 5580 } 5581 if(cfg.logfile != NULL){5581 if(cfg.logfile){ 5582 5582 pos += snprintf(value + pos, needed - pos, "%s%s", dot, cfg.logfile); 5583 5583 } -
trunk/oscam-log.c
r6309 r6323 31 31 static void switch_log(char* file, FILE **f, int32_t (*pfinit)(void)) 32 32 { 33 if(cfg.max_log_size ) //only 1 thread needs to switch the log; even if anticasc, statistics and normal log are running33 if(cfg.max_log_size && file) //only 1 thread needs to switch the log; even if anticasc, statistics and normal log are running 34 34 //at the same time, it is ok to have the other logs switching 1 entry later 35 35 { … … 97 97 if(logStarted) starttext = "log switched"; 98 98 else starttext = "started"; 99 if (!fp && cfg.logfile != NULL) { //log to file99 if (!fp && cfg.logfile) { //log to file 100 100 if ((fp = fopen(cfg.logfile, "a+")) <= (FILE *)0) { 101 101 fp = (FILE *)0;
Note:
See TracChangeset
for help on using the changeset viewer.