Changeset 4979 for trunk/oscam-http.c
- Timestamp:
- 04/12/11 01:29:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-http.c
r4978 r4979 264 264 265 265 for (i = 0; i < (int) sizeof(cfg.c33_key); ++i) tpl_printf(vars, TPLAPPEND, "KEY", "%02X",cfg.c33_key[i]); 266 struct s_ip *cip; 267 char *dot=""; 268 for (cip = cfg.c33_plain; cip; cip = cip->next) { 269 tpl_printf(vars, TPLAPPEND, "NOCRYPT", "%s%s", dot, cs_inet_ntoa(cip->ip[0])); 270 if (cip->ip[0] != cip->ip[1]) tpl_printf(vars, TPLAPPEND, "NOCRYPT", "-%s", cs_inet_ntoa(cip->ip[1])); 271 dot=","; 272 } 266 char *value = mk_t_iprange(cfg.c33_plain); 267 tpl_addVar(vars, TPLADD, "NOCRYPT", value); 268 free(value); 273 269 } 274 270 … … 364 360 for (i = 0; i < 14; i++) tpl_printf(vars, TPLAPPEND, "KEY", "%02X", cfg.ncd_key[i]); 365 361 366 struct s_ip *cip; 367 char *dot = ""; 368 for (cip = cfg.ncd_allowed; cip; cip = cip->next) { 369 tpl_printf(vars, TPLAPPEND, "ALLOWED", "%s%s", dot, cs_inet_ntoa(cip->ip[0])); 370 if (cip->ip[0] != cip->ip[1]) tpl_printf(vars, TPLAPPEND, "ALLOWED", "-%s", cs_inet_ntoa(cip->ip[1])); 371 dot=","; 372 } 362 value = mk_t_iprange(cfg.ncd_allowed); 363 tpl_addVar(vars, TPLADD, "ALLOWED", value); 364 free(value); 373 365 374 366 if (cfg.ncd_keepalive) … … 402 394 tpl_addVar(vars, TPLADD, "USER", cfg.rad_usr); 403 395 404 struct s_ip *cip; 405 char *dot=""; 406 for (cip=cfg.rad_allowed; cip; cip=cip->next) { 407 tpl_printf(vars, TPLAPPEND, "ALLOWED", "%s%s", dot, cs_inet_ntoa(cip->ip[0])); 408 if (cip->ip[0] != cip->ip[1]) 409 tpl_printf(vars, TPLAPPEND, "ALLOWED", "-%s", cs_inet_ntoa(cip->ip[1])); 410 dot=","; 411 } 396 char *value = mk_t_iprange(cfg.rad_allowed); 397 tpl_addVar(vars, TPLADD, "ALLOWED", value); 398 free(value); 412 399 413 400 return tpl_getTpl(vars, "CONFIGRADEGAST"); … … 557 544 if (cfg.http_hide_idle_clients > 0) tpl_addVar(vars, TPLADD, "CHECKED", "checked"); 558 545 559 struct s_ip *cip; 560 char *dot=""; 561 for (cip = cfg.mon_allowed; cip; cip = cip->next) { 562 tpl_printf(vars, TPLAPPEND, "NOCRYPT", "%s%s", dot, cs_inet_ntoa(cip->ip[0])); 563 if (cip->ip[0] != cip->ip[1]) tpl_printf(vars, TPLAPPEND, "NOCRYPT", "-%s", cs_inet_ntoa(cip->ip[1])); 564 dot=","; 565 } 566 567 dot=""; 568 for (cip = cfg.http_allowed; cip; cip = cip->next) { 569 tpl_printf(vars, TPLAPPEND, "HTTPALLOW", "%s%s", dot, cs_inet_ntoa(cip->ip[0])); 570 if (cip->ip[0] != cip->ip[1]) tpl_printf(vars, TPLAPPEND, "HTTPALLOW", "-%s", cs_inet_ntoa(cip->ip[1])); 571 dot=","; 572 } 546 char *value = mk_t_iprange(cfg.mon_allowed); 547 tpl_addVar(vars, TPLADD, "NOCRYPT", value); 548 free(value); 549 550 value = mk_t_iprange(cfg.http_allowed); 551 tpl_addVar(vars, TPLADD, "HTTPALLOW", value); 552 free(value); 573 553 574 554 tpl_printf(vars, TPLADD, "HTTPDYNDNS", "%s", cfg.http_dyndns);
Note:
See TracChangeset
for help on using the changeset viewer.