| 996 | |
| 997 | |
| 998 | void clean_cc_unref_data(struct cc_data *data) |
| 999 | { |
| 1000 | struct cc_agent *agent, **prv_agent; |
| 1001 | struct cc_flow *flow, **prv_flow; |
| 1002 | |
| 1003 | /* clean unref flows */ |
| 1004 | flow = data->old_flows; |
| 1005 | prv_flow = &(data->old_flows); |
| 1006 | while(flow) { |
| 1007 | if (flow->ref_cnt!=0) { |
| 1008 | prv_flow = &(flow->next); |
| 1009 | flow = flow->next; |
| 1010 | } else { |
| 1011 | *prv_flow = flow->next; |
| 1012 | free_cc_flow(flow); |
| 1013 | flow = (*prv_flow); |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | /* clean unref agents */ |
| 1018 | agent = data->old_agents; |
| 1019 | prv_agent = &(data->old_agents); |
| 1020 | while(agent) { |
| 1021 | if (agent->ref_cnt!=0) { |
| 1022 | prv_agent = &(agent->next); |
| 1023 | agent = agent->next; |
| 1024 | } else { |
| 1025 | *prv_agent = agent->next; |
| 1026 | free_cc_agent(agent); |
| 1027 | agent = (*prv_agent); |
| 1028 | } |
| 1029 | } |
| 1030 | |
| 1031 | return; |
| 1032 | } |
| 1033 | |
| 1034 | |
| 1035 | void print_queue(struct cc_data *data) |
no test coverage detected