Changeset 5245 for trunk/oscam-config.c
- Timestamp:
- 05/16/11 23:31:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-config.c
r5233 r5245 53 53 TAG_CS378X, // camd 3.5x TCP 54 54 TAG_GBOX, // gbox 55 #ifdef MODULE_CCCAM 55 56 TAG_CCCAM, // cccam 57 #endif 56 58 TAG_CONSTCW, // constcw 57 59 TAG_DVBAPI, // dvbapi … … 61 63 62 64 static const char *cctag[]={"global", "monitor", "camd33", "camd35", "newcamd", "radegast", "serial", 63 "cs357x", "cs378x", "gbox", "cccam", "constcw", "dvbapi", "webif", "anticasc", NULL}; 65 "cs357x", "cs378x", "gbox", 66 #ifdef MODULE_CCCAM 67 "cccam", 68 #endif 69 "constcw", "dvbapi", "webif", "anticasc", NULL}; 64 70 65 71 … … 343 349 } 344 350 351 #ifdef MODULE_CCCAM 345 352 void chk_cccam_ports(char *value) 346 353 { … … 355 362 } 356 363 } 364 #endif 357 365 358 366 #ifdef NOTUSED … … 554 562 } 555 563 564 #ifdef WITH_LB 556 565 if (!strcmp(token, "readerautoloadbalance") || !strcmp(token, "lb_mode")) { 557 566 cfg.lb_mode = strToIntVal(value, DEFAULT_LB_MODE); … … 648 657 return; 649 658 } 659 #endif 650 660 651 661 if (!strcmp(token, "resolvegethostbyname")) { … … 1063 1073 } 1064 1074 1075 #ifdef MODULE_CCCAM 1065 1076 void chk_t_cccam(char *token, char *value) 1066 1077 { … … 1131 1142 fprintf(stderr, "Warning: keyword '%s' in cccam section not recognized\n",token); 1132 1143 } 1144 #endif 1133 1145 1134 1146 void chk_t_radegast(char *token, char *value) … … 1290 1302 case TAG_SERIAL : chk_t_serial(token, value); break; 1291 1303 case TAG_CS378X : chk_t_camd35_tcp(token, value); break; 1304 #ifdef MODULE_CCCAM 1292 1305 case TAG_CCCAM : chk_t_cccam(token, value); break; 1306 #endif 1293 1307 case TAG_GBOX : chk_t_gbox(token, value); break; 1294 1308 … … 1456 1470 #endif 1457 1471 1472 #ifdef WITH_LB 1458 1473 //loadbalancer defaults: 1459 1474 cfg.lb_mode = DEFAULT_LB_MODE; … … 1467 1482 cfg.lb_auto_betatunnel = DEFAULT_LB_AUTO_BETATUNNEL; 1468 1483 //end loadbalancer defaults 1469 1484 #endif 1485 1470 1486 snprintf(token, sizeof(token), "%s%s", cs_confdir, cs_conf); 1471 1487 if (!(fp = fopen(token, "r"))) { … … 1600 1616 } 1601 1617 1618 #ifdef MODULE_CCCAM 1602 1619 if (!strcmp(token, "cccmaxhops")) { 1603 1620 account->cccmaxhops = strToIntVal(value, 10); … … 1625 1642 return; 1626 1643 } 1644 #endif 1627 1645 1628 1646 if (!strcmp(token, "keepalive")) { … … 1892 1910 fprintf_conf(f, CONFVARWIDTH, "dropdups", "%d\n", cfg.dropdups); 1893 1911 1912 #ifdef WITH_LB 1894 1913 if (cfg.lb_mode != DEFAULT_LB_MODE || cfg.http_full_cfg) 1895 1914 fprintf_conf(f, CONFVARWIDTH, "lb_mode", "%d\n", cfg.lb_mode); … … 1937 1956 if (cfg.lb_auto_betatunnel != DEFAULT_LB_AUTO_BETATUNNEL || cfg.http_full_cfg) 1938 1957 fprintf_conf(f, CONFVARWIDTH, "lb_auto_betatunnel", "%d\n", cfg.lb_auto_betatunnel); 1958 #endif 1939 1959 1940 1960 if (cfg.resolve_gethostbyname || cfg.http_full_cfg) … … 2074 2094 } 2075 2095 2096 #ifdef MODULE_CCCAM 2076 2097 /*cccam*/ 2077 2098 if ( cfg.cc_port[0] > 0) { … … 2101 2122 fprintf(f,"\n"); 2102 2123 } 2124 #endif 2103 2125 2104 2126 #ifdef HAVE_DVBAPI … … 2320 2342 fprintf_conf(f, CONFVARWIDTH, "suppresscmd08", "%d\n", account->c35_suppresscmd08); 2321 2343 2344 #ifdef MODULE_CCCAM 2322 2345 if (account->cccmaxhops != 10 || cfg.http_full_cfg) 2323 2346 fprintf_conf(f, CONFVARWIDTH, "cccmaxhops", "%d\n", account->cccmaxhops); … … 2331 2354 if ((account->cccstealth != cfg.cc_stealth && account->cccstealth != -1 ) || cfg.http_full_cfg) 2332 2355 fprintf_conf(f, CONFVARWIDTH, "cccstealth", "%d\n", account->cccstealth); 2356 #endif 2333 2357 2334 2358 if (account->c35_sleepsend || cfg.http_full_cfg) … … 2560 2584 fprintf_conf(f, CONFVARWIDTH, "blockemm-g", "%d\n", (rdr->blockemm & EMM_GLOBAL) ? 1: 0); 2561 2585 2586 #ifdef WITH_LB 2562 2587 if (rdr->lb_weight != 100 || cfg.http_full_cfg) 2563 2588 fprintf_conf(f, CONFVARWIDTH, "lb_weight", "%d\n", rdr->lb_weight); 2589 #endif 2564 2590 2565 2591 //savenano … … 2575 2601 free_mk_t(value); 2576 2602 2603 #ifdef MODULE_CCCAM 2577 2604 if (rdr->typ == R_CCCAM) { 2578 2605 if (rdr->cc_version[0] || cfg.http_full_cfg) … … 2594 2621 fprintf_conf(f, CONFVARWIDTH, "cccreshare", "%d\n", rdr->cc_reshare); 2595 2622 } 2623 #endif 2596 2624 2597 2625 if ((rdr->deprecated || cfg.http_full_cfg) && isphysical) … … 4037 4065 } 4038 4066 4067 #ifdef WITH_LB 4039 4068 if (!strcmp(token, "lb_weight")) { 4040 4069 if(strlen(value) == 0) { … … 4048 4077 } 4049 4078 } 4050 4079 #endif 4080 4081 #ifdef MODULE_CCCAM 4051 4082 if (!strcmp(token, "cccversion")) { 4052 4083 // cccam version … … 4082 4113 } 4083 4114 4084 if (!strcmp(token, "deprecated")) {4085 rdr->deprecated = strToIntVal(value, 0);4086 return;4087 }4088 4089 4115 if (!strcmp(token, "ccchopsaway") || !strcmp(token, "cccreshar") || !strcmp(token, "cccreshare")) { 4090 4116 rdr->cc_reshare = atoi(value); 4091 4117 if (rdr->cc_reshare == cfg.cc_reshare) 4092 4118 rdr->cc_reshare = -1; 4119 return; 4120 } 4121 #endif 4122 4123 if (!strcmp(token, "deprecated")) { 4124 rdr->deprecated = strToIntVal(value, 0); 4093 4125 return; 4094 4126 } … … 4272 4304 rdr->deprecated = 0; 4273 4305 rdr->force_irdeto = 0; 4306 #ifdef MODULE_CCCAM 4274 4307 rdr->cc_reshare = -1; 4275 4308 rdr->cc_maxhop = 10; 4276 4309 rdr->cc_mindown = 0; 4310 #endif 4311 #ifdef WITH_LB 4277 4312 rdr->lb_weight = 100; 4313 #endif 4278 4314 cs_strncpy(rdr->pincode, "none", sizeof(rdr->pincode)); 4279 4315 rdr->ndsversion = 0; … … 4585 4621 } 4586 4622 4623 #ifdef MODULE_CCCAM 4587 4624 /* 4588 4625 * Creates a string ready to write as a token into config or WebIf for the cccam tcp ports. You must free the returned value through free_mk_t(). … … 4602 4639 return value; 4603 4640 } 4641 #endif 4604 4642 4605 4643
Note:
See TracChangeset
for help on using the changeset viewer.