MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / free_cc_data

Function free_cc_data

modules/call_center/cc_data.c:150–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149
150void free_cc_data(struct cc_data *data)
151{
152 struct cc_flow *flow, *f_flow;
153 struct cc_agent *agent,*f_agent;
154 int i;
155
156 if (data) {
157 /* lock */
158 if (data->lock) {
159 lock_destroy( data->lock );
160 lock_dealloc( data->lock );
161 }
162 if (data->call_locks) {
163 lock_set_destroy( data->call_locks );
164 lock_set_dealloc( data->call_locks );
165 }
166 /* flows */
167 for( flow=data->flows ; flow ; ) {
168 f_flow = flow;
169 flow = flow->next;
170 free_cc_flow( f_flow );
171 }
172 /* agents */
173 for(i = 0; i< 2; i++) {
174 for( agent=data->agents[i] ; agent ; ) {
175 f_agent = agent;
176 agent = agent->next;
177 free_cc_agent( f_agent );
178 }
179 }
180 shm_free(data);
181 }
182}
183
184
185struct cc_flow *get_flow_by_name(struct cc_data *data, str *name)

Callers 2

mod_destroyFunction · 0.85
init_cc_dataFunction · 0.85

Calls 5

lock_destroyFunction · 0.85
lock_set_destroyFunction · 0.85
free_cc_flowFunction · 0.85
free_cc_agentFunction · 0.85
shm_freeFunction · 0.85

Tested by

no test coverage detected