Changeset 8465


Ignore:
Timestamp:
03/03/13 21:12:31 (9 years ago)
Author:
gf
Message:

cfg: Remove newcamd vars from struct s_config when the module is disabled.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals.h

    r8464 r8465  
    16611661#endif
    16621662    int8_t          c35_suppresscmd08; // used in cccam module
     1663#ifdef MODULE_NEWCAMD
    16631664    PTAB            ncd_ptab;
    16641665    IN_ADDR_T       ncd_srvip;
     
    16671668    int8_t          ncd_mgclient;
    16681669    struct s_ip     *ncd_allowed;
     1670#endif
    16691671#ifdef MODULE_RADEGAST
    16701672    int32_t         rad_port;
  • trunk/oscam-chk.c

    r8456 r8465  
    365365int32_t chk_sfilter(ECM_REQUEST *er, PTAB *ptab)
    366366{
     367#ifdef MODULE_NEWCAMD
    367368  int32_t i, j, pi, rc=1;
    368369  uint16_t caid, scaid;
     
    410411  }
    411412  return (rc);
     413#else
     414  (void)er;
     415  (void)ptab;
     416  return 0;
     417#endif
    412418}
    413419
  • trunk/oscam-conf-mk.c

    r8464 r8465  
    287287 */
    288288char *mk_t_newcamd_port(void) {
     289#ifdef MODULE_NEWCAMD
    289290    int32_t i, j, k, pos = 0, needed = 1;
    290291
     
    329330    }
    330331    return value;
     332#else
     333    return NULL;
     334#endif
    331335}
    332336
  • trunk/oscam-config-account.c

    r8358 r8465  
    3434static void account_ncd_keepalive_fn(const char *token, char *value, void *setting, FILE *f) {
    3535    int8_t *ncd_keepalive = setting;
    36     if (value) {
    37         *ncd_keepalive = (int8_t)strToIntVal(value, cfg.ncd_keepalive);
    38         return;
    39     }
    40     if (*ncd_keepalive != cfg.ncd_keepalive || cfg.http_full_cfg)
     36    int8_t def_value = 0;
     37#ifdef MODULE_NEWCAMD
     38    def_value = cfg.ncd_keepalive;
     39#endif
     40    if (value) {
     41        *ncd_keepalive = (int8_t)strToIntVal(value, def_value);
     42        return;
     43    }
     44    if (*ncd_keepalive != def_value || cfg.http_full_cfg)
    4145        fprintf_conf(f, token, "%d\n", *ncd_keepalive);
    4246}
  • trunk/oscam-config-global.c

    r8464 r8465  
    783783void config_free(void) {
    784784    config_sections_free(oscam_conf, &cfg);
     785#ifdef MODULE_NEWCAMD
    785786    clear_ptab(&cfg.ncd_ptab);
     787#endif
    786788#ifdef MODULE_CAMD35_TCP
    787789    clear_ptab(&cfg.c35_tcp_ptab);
  • trunk/oscam-ecm.c

    r8460 r8465  
    11741174    }
    11751175
     1176#ifdef MODULE_NEWCAMD
    11761177    // Set providerid for newcamd clients if none is given
    11771178    if (!er->prid && client->ncd_server) {
     
    11801181            er->prid = cfg.ncd_ptab.ports[pi].ncd->ncd_ftab.filts[0].prids[0];
    11811182    }
     1183#endif
    11821184
    11831185    // CAID not supported or found
Note: See TracChangeset for help on using the changeset viewer.