Lines Matching refs:state
7 /* initialize/cleanup shared state
13 /* void smtp_state_free(state)
14 /* SMTP_STATE *state;
16 /* smtp_state_init() initializes the shared state, and allocates
64 SMTP_STATE *state = (SMTP_STATE *) mymalloc(sizeof(*state));
66 state->misc_flags = 0;
67 state->src = 0;
68 state->service = 0;
69 state->request = 0;
70 state->session = 0;
71 state->status = 0;
72 state->space_left = 0;
73 state->iterator->request_nexthop = vstring_alloc(100);
74 state->iterator->dest = vstring_alloc(100);
75 state->iterator->host = vstring_alloc(100);
76 state->iterator->addr = vstring_alloc(100);
77 state->iterator->saved_dest = vstring_alloc(100);
79 state->dest_label = vstring_alloc(10);
80 state->dest_prop = vstring_alloc(10);
81 state->endp_label = vstring_alloc(10);
82 state->endp_prop = vstring_alloc(10);
83 state->cache_used = htable_create(1);
85 state->dest_label = 0;
86 state->dest_prop = 0;
87 state->endp_label = 0;
88 state->endp_prop = 0;
89 state->cache_used = 0;
91 state->why = dsb_create();
92 state->debug_peer_per_nexthop = 0;
93 state->logged_line_length_limit = 0;
94 return (state);
97 /* smtp_state_free - destroy state */
99 void smtp_state_free(SMTP_STATE *state)
105 vstring_free(state->iterator->request_nexthop);
106 vstring_free(state->iterator->dest);
107 vstring_free(state->iterator->host);
108 vstring_free(state->iterator->addr);
109 vstring_free(state->iterator->saved_dest);
110 if (state->dest_label)
111 vstring_free(state->dest_label);
112 if (state->dest_prop)
113 vstring_free(state->dest_prop);
114 if (state->endp_label)
115 vstring_free(state->endp_label);
116 if (state->endp_prop)
117 vstring_free(state->endp_prop);
118 if (state->cache_used)
119 htable_free(state->cache_used, (void (*) (void *)) 0);
120 if (state->why)
121 dsb_free(state->why);
122 if (state->debug_peer_per_nexthop)
125 myfree((void *) state);