Changeset 1665


Ignore:
Timestamp:
02/24/10 00:30:20 (11 years ago)
Author:
alno
Message:

WebIf:

  • add function clear_tuntab() to simples
  • some changings in monitor module setuser
Location:
branches/monitor-improvement
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/globals.h

    r1655 r1665  
    777777extern void clear_ptab(struct s_ptab *ptab);
    778778void clear_caidtab(struct s_caidtab *ctab);
     779void clear_tuntab(struct s_tuntab *ttab);
    779780extern int safe_overwrite_with_bak(char *destfile, char *tmpfile, char *bakfile, int forceBakOverWrite);
    780781extern void fprintf_conf(FILE *f, int varnameWidth, const char *varname, const char *fmtstring, ...);
  • branches/monitor-improvement/module-monitor.c

    r1587 r1665  
    502502
    503503static void monitor_set_debuglevel(char *flag){
    504     cs_dblevel^=atoi(flag);
     504    cfg->debuglvl = atoi(flag);
    505505    kill(client[0].pid, SIGUSR1);
    506506}
     
    555555    for (i = 0; i < tokencnt; i++){
    556556        if (!strcmp(argarray[1], token[i])){
    557             chk_account(token[i],argarray[2],account);
     557            // preparing the parameters before re-load
     558            switch(i) {
     559
     560                case    6: clear_tuntab(&account->ttab); break;     //betatunnel
     561
     562                case    8: clear_caidtab(&account->ctab); break;    //Caid
     563
     564
     565
     566
     567            }
    558568            found = 1;
    559569        }
     
    564574        monitor_send_info(buf, 1);
    565575        return;
     576    } else {
     577        chk_account(token[i],argarray[2],account);
    566578    }
    567579
  • branches/monitor-improvement/oscam-simples.c

    r1655 r1665  
    500500}
    501501
     502/* Clears given tuntab */
     503void clear_tuntab(struct s_tuntab *ttab){
     504    int i;
     505    for (i = 0; i < CS_MAXTUNTAB; i++) {
     506        ttab->bt_caidfrom[i] = 0;
     507        ttab->bt_caidto[i] = 0;
     508        ttab->bt_srvid[i] = 0;
     509    }
     510}
    502511/* Overwrites destfile with tmpfile. If forceBakOverWrite = 0, the bakfile will not be overwritten if it exists, else it will be.*/
    503512int safe_overwrite_with_bak(char *destfile, char *tmpfile, char *bakfile, int forceBakOverWrite){
Note: See TracChangeset for help on using the changeset viewer.