|
|
@ -165,21 +165,33 @@ void init_state(s_state *pstate)
|
|
|
|
void deinit_state(s_state *pstate)
|
|
|
|
void deinit_state(s_state *pstate)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DEB((D_FREE, "deinit_state begin"));
|
|
|
|
DEB((D_FREE, "deinit_state begin"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state linename"));
|
|
|
|
if (pstate->linename) free(pstate->linename);
|
|
|
|
if (pstate->linename) free(pstate->linename);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state cidstr"));
|
|
|
|
if (pstate->cidstr) free(pstate->cidstr);
|
|
|
|
if (pstate->cidstr) free(pstate->cidstr);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state peername"));
|
|
|
|
if (pstate->peername) free(pstate->peername);
|
|
|
|
if (pstate->peername) free(pstate->peername);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state connstr"));
|
|
|
|
if (pstate->connstr) free(pstate->connstr);
|
|
|
|
if (pstate->connstr) free(pstate->connstr);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state inbound"));
|
|
|
|
if (pstate->inbound) free(pstate->inbound);
|
|
|
|
if (pstate->inbound) free(pstate->inbound);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state tinbound"));
|
|
|
|
if (pstate->tinbound) free(pstate->tinbound);
|
|
|
|
if (pstate->tinbound) free(pstate->tinbound);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state mailfor"));
|
|
|
|
if (pstate->mailfor) deinit_falist(pstate->mailfor);
|
|
|
|
if (pstate->mailfor) deinit_falist(pstate->mailfor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state fsqueue"));
|
|
|
|
deinit_fsqueue(&pstate->queue);
|
|
|
|
deinit_fsqueue(&pstate->queue);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state handshake"));
|
|
|
|
if (state.handshake && state.handshake->deinit) {
|
|
|
|
if (state.handshake && state.handshake->deinit) {
|
|
|
|
state.handshake->deinit(state.handshake);
|
|
|
|
state.handshake->deinit(state.handshake);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state remotedata"));
|
|
|
|
if (pstate->remoteaddrs) free (pstate->remoteaddrs);
|
|
|
|
if (pstate->remoteaddrs) free (pstate->remoteaddrs);
|
|
|
|
|
|
|
|
DEB((D_FREE, "deinit_state localdata"));
|
|
|
|
if (pstate->localaddrs) free (pstate->localaddrs);
|
|
|
|
if (pstate->localaddrs) free (pstate->localaddrs);
|
|
|
|
|
|
|
|
|
|
|
|
memset(pstate, '\0', sizeof(s_state));
|
|
|
|
memset(pstate, '\0', sizeof(s_state));
|
|
|
|