Changeset 8204
- Timestamp:
- 01/27/13 13:09:22 (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-config-account.c
r8200 r8204 243 243 } 244 244 245 static void account_class_fn(const char *token, char *value, void *setting, FILE *f) {246 struct s_auth *account= setting;245 void class_fn(const char *token, char *value, void *setting, FILE *f) { 246 CLASSTAB *cltab = setting; 247 247 if (value) { 248 248 strtolower(value); 249 chk_cltab(value, &account->cltab);250 return; 251 } 252 if ((account->cltab.bn > 0 || account->cltab.an > 0) || cfg.http_full_cfg) {253 value = mk_t_cltab(&account->cltab);249 chk_cltab(value, cltab); 250 return; 251 } 252 value = mk_t_cltab(cltab); 253 if (strlen(value) > 0 || cfg.http_full_cfg) { 254 254 fprintf_conf(f, token, "%s\n", value); 255 255 free_mk_t(value); … … 296 296 DEF_OPT_FUNC("ident" , 0, account_ident_fn ), 297 297 DEF_OPT_FUNC("chid" , 0, account_chid_fn ), 298 DEF_OPT_FUNC("class" , 0, account_class_fn ),298 DEF_OPT_FUNC("class" , OFS(cltab), class_fn ), 299 299 #ifdef CS_CACHEEX 300 300 DEF_OPT_INT8("cacheex" , OFS(cacheex.mode), 0 ), -
trunk/oscam-config-reader.c
r8203 r8204 639 639 } 640 640 641 static void class_fn(const char *token, char *value, void *setting, FILE *f) {642 struct s_reader *rdr = setting;643 if (value) {644 strtolower(value);645 chk_cltab(value, &rdr->cltab);646 return;647 }648 value = mk_t_cltab(&rdr->cltab);649 if (strlen(value) > 0 || cfg.http_full_cfg)650 fprintf_conf(f, token, "%s\n", value);651 free_mk_t(value);652 }653 654 641 static void aeskeys_fn(const char *token, char *value, void *setting, FILE *f) { 655 642 struct s_reader *rdr = setting; … … 948 935 DEF_OPT_FUNC("ident" , 0, ident_fn ), 949 936 DEF_OPT_FUNC("chid" , 0, chid_fn ), 950 DEF_OPT_FUNC("class" , 0,class_fn ),937 DEF_OPT_FUNC("class" , OFS(cltab), class_fn ), 951 938 DEF_OPT_FUNC("aeskeys" , 0, aeskeys_fn ), 952 939 DEF_OPT_FUNC("group" , 0, group_fn ), -
trunk/oscam-config.h
r8202 r8204 35 35 void hitvaluetab_fn(const char *token, char *value, void *setting, FILE *f); 36 36 void newcamd_key_fn(const char *token, char *value, void *setting, FILE *f); 37 void class_fn(const char *token, char *value, void *setting, FILE *f); 37 38 38 39 #endif
Note:
See TracChangeset
for help on using the changeset viewer.