comparison src/protocols/oscar/conn.c @ 2675:e759254b29bb

[gaim-migrate @ 2688] This source code was developed using Microsoft Visual Studio 6.0. committer: Tailor Script <tailor@pidgin.im>
author Adam Fritzler <mid@auk.cx>
date Mon, 05 Nov 2001 12:25:22 +0000
parents c41030cfed76
children 441b84ab7f4e
comparison
equal deleted inserted replaced
2674:de99ce38ad1f 2675:e759254b29bb
102 } 102 }
103 103
104 return NULL; 104 return NULL;
105 } 105 }
106 106
107 static struct snacgroup *connkill_snacgroups(struct snacgroup *sg) 107 static void connkill_snacgroups(struct snacgroup **head)
108 { 108 {
109 109 struct snacgroup *sg;
110 while (sg) { 110
111 for (sg = *head; sg; ) {
111 struct snacgroup *tmp; 112 struct snacgroup *tmp;
112 113
113 tmp = sg->next; 114 tmp = sg->next;
114 free(sg); 115 free(sg);
115 sg = tmp; 116 sg = tmp;
116 } 117 }
117 118
118 return NULL; 119 *head = NULL;
120
121 return;
122 }
123
124 static void connkill_rates(struct rateclass **head)
125 {
126 struct rateclass *rc;
127
128 for (rc = *head; rc; ) {
129 struct rateclass *tmp;
130
131 tmp = rc->next;
132 free(rc);
133 rc = tmp;
134 }
135
136 *head = NULL;
137
138 return;
119 } 139 }
120 140
121 static void connkill_real(aim_session_t *sess, aim_conn_t **deadconn) 141 static void connkill_real(aim_session_t *sess, aim_conn_t **deadconn)
122 { 142 {
123 143
142 aim_conn_kill_rend(sess, *deadconn); 162 aim_conn_kill_rend(sess, *deadconn);
143 163
144 if ((*deadconn)->inside) { 164 if ((*deadconn)->inside) {
145 aim_conn_inside_t *inside = (aim_conn_inside_t *)(*deadconn)->inside; 165 aim_conn_inside_t *inside = (aim_conn_inside_t *)(*deadconn)->inside;
146 166
147 inside->groups = connkill_snacgroups(inside->groups); 167 connkill_snacgroups(&inside->groups);
168 connkill_rates(&inside->rates);
148 169
149 free(inside); 170 free(inside);
150 } 171 }
151 172
152 free(*deadconn); 173 free(*deadconn);