Changeset 7435
- Timestamp:
- 09/14/12 17:53:20 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/global-functions.h
r7430 r7435 139 139 extern int32_t init_config(void); 140 140 extern int32_t init_free_userdb(struct s_auth *auth); 141 extern void account_set_defaults(struct s_auth *auth); 141 142 extern struct s_auth *init_userdb(void); 142 143 extern int32_t init_readerdb(void); -
trunk/module-webif.c
r7434 r7435 1862 1862 ptr->next = account; 1863 1863 } 1864 account_set_defaults(account); 1864 1865 account->disabled = 1; 1865 1866 cs_strncpy((char *)account->usr, user, sizeof(account->usr)); 1866 account->monlvl=cfg.mon_level;1867 account->tosleep=cfg.tosleep;1868 1867 if (!account->grp) 1869 1868 account->grp = 1; 1870 for (i=1; i<CS_MAXCAIDTAB; account->ctab.mask[i++]=0xffff);1871 for (i=1; i<CS_MAXTUNTAB; account->ttab.bt_srvid[i++]=0x0000);1872 account->expirationdate=(time_t)NULL;1873 #ifdef MODULE_CCCAM1874 account->cccmaxhops = DEFAULT_CC_MAXHOP; // default value1875 account->cccreshare = DEFAULT_CC_RESHARE; // default use global conf1876 account->cccstealth = DEFAULT_CC_STEALTH; // default use global conf1877 #endif1878 #ifdef CS_ANTICASC1879 account->ac_users = DEFAULT_AC_USERS; // by default create the new user with global ac_users value1880 account->ac_penalty = DEFAULT_AC_PENALTY; // by default create the new user with global penality value1881 #endif1882 1869 tpl_addMsg(vars, "New user has been added with default settings"); 1883 1870 -
trunk/oscam-config.c
r7434 r7435 1602 1602 } 1603 1603 1604 void account_set_defaults(struct s_auth *account) { 1605 int i; 1606 config_list_set_defaults(account_opts, account); 1607 account->monlvl = cfg.mon_level; 1608 account->tosleep = cfg.tosleep; 1609 account->c35_suppresscmd08 = cfg.c35_suppresscmd08; 1610 account->ncd_keepalive = cfg.ncd_keepalive; 1611 for (i = 1; i < CS_MAXCAIDTAB; account->ctab.mask[i++] = 0xffff); 1612 } 1613 1604 1614 struct s_auth *init_userdb(void) 1605 1615 { … … 1616 1626 1617 1627 while (fgets(token, MAXLINESIZE, fp)) { 1618 int32_t i,l;1628 int32_t l; 1619 1629 void *ptr; 1620 1630 … … 1636 1646 1637 1647 account = ptr; 1638 config_list_set_defaults(account_opts, account); 1639 account->allowedtimeframe[0] = 0; 1640 account->allowedtimeframe[1] = 0; 1641 account->aureader_list = NULL; 1642 account->monlvl = cfg.mon_level; 1643 account->tosleep = cfg.tosleep; 1644 account->c35_suppresscmd08 = cfg.c35_suppresscmd08; 1645 account->ncd_keepalive = cfg.ncd_keepalive; 1646 account->firstlogin = 0; 1647 for (i = 1; i < CS_MAXCAIDTAB; account->ctab.mask[i++] = 0xffff); 1648 for (i = 1; i < CS_MAXTUNTAB; account->ttab.bt_srvid[i++] = 0x0000); 1648 account_set_defaults(account); 1649 1649 nr++; 1650 1650
Note:
See TracChangeset
for help on using the changeset viewer.