| 148 | |
| 149 | |
| 150 | void 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 | |
| 185 | struct cc_flow *get_flow_by_name(struct cc_data *data, str *name) |
no test coverage detected