Lines Matching refs:state
14 /* void qmqpd_state_free(state)
15 /* QMQPD_STATE *state;
58 /* qmqpd_state_alloc - allocate and initialize session state */
62 QMQPD_STATE *state;
64 state = (QMQPD_STATE *) mymalloc(sizeof(*state));
65 state->err = CLEANUP_STAT_OK;
66 state->client = stream;
67 state->message = vstring_alloc(1000);
68 state->buf = vstring_alloc(100);
69 GETTIMEOFDAY(&state->arrival_time);
70 qmqpd_peer_init(state);
71 state->queue_id = 0;
72 state->cleanup = 0;
73 state->dest = 0;
74 state->rcpt_count = 0;
75 state->reason = 0;
76 state->sender = 0;
77 state->recipient = 0;
78 state->protocol = MAIL_PROTO_QMQP;
79 state->where = "initializing client connection";
80 state->why_rejected = vstring_alloc(10);
81 return (state);
84 /* qmqpd_state_free - destroy session state */
86 void qmqpd_state_free(QMQPD_STATE *state)
88 vstring_free(state->message);
89 vstring_free(state->buf);
90 qmqpd_peer_reset(state);
91 if (state->queue_id)
92 myfree(state->queue_id);
93 if (state->dest)
94 mail_stream_cleanup(state->dest);
95 if (state->sender)
96 myfree(state->sender);
97 if (state->recipient)
98 myfree(state->recipient);
99 vstring_free(state->why_rejected);
100 myfree((void *) state);