MCPcopy Create free account
hub / github.com/3proxy/3proxy / freeconf

Function freeconf

src/conf.c:1581–1691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579
1580
1581void freeconf(struct extparam *confp){
1582 struct bandlim * bl;
1583 struct bandlim * blout;
1584 struct trafcount * tc;
1585 struct passwords *pw;
1586 struct ace *acl;
1587 struct filemon *fm;
1588 int counterd, archiverc;
1589 unsigned char *logname, *logtarget;
1590 unsigned char **archiver;
1591 unsigned char * logformat;
1592
1593 int i;
1594
1595
1596
1597
1598 pthread_mutex_lock(&tc_mutex);
1599 confp->trafcountfunc = NULL;
1600 tc = confp->trafcounter;
1601 confp->trafcounter = NULL;
1602 counterd = confp->counterd;
1603 confp->counterd = -1;
1604 confp->countertype = NONE;
1605 pthread_mutex_unlock(&tc_mutex);
1606
1607 pthread_mutex_lock(&bandlim_mutex);
1608 bl = confp->bandlimiter;
1609 blout = confp->bandlimiterout;
1610 confp->bandlimiter = NULL;
1611 confp->bandlimiterout = NULL;
1612 confp->bandlimfunc = NULL;
1613 pthread_mutex_unlock(&bandlim_mutex);
1614
1615 pthread_mutex_lock(&pwl_mutex);
1616 pw = confp->pwl;
1617 confp->pwl = NULL;
1618 pthread_mutex_unlock(&pwl_mutex);
1619
1620
1621 logtarget = confp->logtarget;
1622 confp->logtarget = NULL;
1623 logformat = confp->logformat;
1624 confp->logformat = NULL;
1625 logname = confp->logname;
1626 confp->logname = NULL;
1627 confp->rotate = 0;
1628 confp->logtype = NONE;
1629
1630 archiverc = confp->archiverc;
1631 confp->archiverc = 0;
1632 archiver = confp->archiver;
1633 confp->archiver = NULL;
1634 fm = confp->fmon;
1635 confp->fmon = NULL;
1636 confp->bandlimfunc = NULL;
1637 memset(&confp->intsa, 0, sizeof(confp->intsa));
1638 memset(&confp->extsa, 0, sizeof(confp->extsa));

Callers 2

WinMainFunction · 0.85
reloadFunction · 0.85

Calls 6

h_authFunction · 0.85
dumpcountersFunction · 0.85
itfreeFunction · 0.85
myfreeFunction · 0.85
freeaclFunction · 0.85
freepwlFunction · 0.85

Tested by

no test coverage detected