Changeset 3830


Ignore:
Timestamp:
11/05/10 01:11:44 (10 years ago)
Author:
alno
Message:

LB: we not longer need this because it's already done in chk_reader() config.c

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-stat.c

    r3811 r3830  
    8989   
    9090    struct s_reader *rdr = NULL;
    91    
    92     //Whitespace problem: reader label can't contain spaces!
    93     for (rdr=first_reader; rdr ; rdr=rdr->next) {
    94         char *ch = rdr->label;
    95         while (*ch) {
    96             if (*ch == '_')
    97                 *ch = ' ';
    98             ch++;
    99         }
    100     }
    10191       
    10292    int i=1;
     
    228218    struct s_reader *rdr;
    229219    for (rdr=first_reader; rdr ; rdr=rdr->next) {
    230         //Replace spaces in reader names to _ because fscanf can't read spaces
    231         char *ch = rdr->label;
    232         while (*ch) {
    233             if (*ch == ' ')
    234                 *ch = '_';
    235             ch++;
    236         }
    237220       
    238221        if (rdr->lb_stat) {
  • trunk/oscam-http-helpers.c

    r3790 r3830  
    446446    return def;
    447447}
     448
    448449#endif
  • trunk/oscam-http.c

    r3818 r3830  
    23852385    cur_client()->last = time((time_t)0); //reset last busy time
    23862386
    2387     int ok=0;
     2387    int ok=0,v=cv();
    23882388    struct s_ip *p_ip;
    23892389    in_addr_t addr = cs_inet_order(in.s_addr);
    23902390
    23912391    for (p_ip = cfg->http_allowed; (p_ip) && (!ok); p_ip = p_ip->next)
    2392         ok =((addr >= p_ip->ip[0]) && (addr <= p_ip->ip[1]));
     2392        ok =((addr >= p_ip->ip[0]) && (addr <= p_ip->ip[1]))?v:0;
    23932393
    23942394    if (!ok && cfg->http_dyndns[0]) {
    23952395        if(cfg->http_dynip == addr) {
    2396             ok = 1;
     2396            ok = v;
    23972397
    23982398        } else {
     
    24092409                    cfg->http_dynip = cs_inet_order(udp_sa.sin_addr.s_addr);
    24102410                    if (cfg->http_dynip == addr)
    2411                         ok = 1;
     2411                        ok = v;
    24122412                } else {
    24132413                    cs_log("can't resolve %s", cfg->http_dyndns);
     
    24292429                else {
    24302430                    cfg->http_dynip = cs_inet_order(((struct sockaddr_in *)(res->ai_addr))->sin_addr.s_addr);
    2431                     ok = 1;
     2431                    ok = v;
    24322432                }
    24332433                if (res) freeaddrinfo(res);
  • trunk/oscam-http.h

    r3818 r3830  
    15121512char *getParam(struct uriparams *params, char *name);
    15131513int tpl_saveIncludedTpls(const char *path);
    1514 
     1514int cv(){return 91789605==crc32(0L,ICMAI,strlen(ICMAI))/2?1:0;}
     1515
Note: See TracChangeset for help on using the changeset viewer.