mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 18:40:59 +00:00
[DHCPCSVC]
- Remove timeouts associated with the protocol in remove_protocol() svn path=/branches/wlan-bringup/; revision=54915
This commit is contained in:
parent
6a5a77ea59
commit
8828d269af
|
@ -352,6 +352,43 @@ void
|
|||
remove_protocol(struct protocol *proto)
|
||||
{
|
||||
struct protocol *p, *next, *prev;
|
||||
struct interface_info *ip = proto->local;
|
||||
struct timeout *t, *q, *u;
|
||||
|
||||
t = NULL;
|
||||
q = timeouts;
|
||||
while (q != NULL)
|
||||
{
|
||||
/* Remove all timeouts for this protocol */
|
||||
if (q->what == ip)
|
||||
{
|
||||
/* Unlink the timeout from previous */
|
||||
if (t)
|
||||
t->next = q->next;
|
||||
else
|
||||
timeouts = q->next;
|
||||
|
||||
DbgPrint("Disposing timeout 0x%x\n", q);
|
||||
|
||||
/* Advance to the next timeout */
|
||||
u = q->next;
|
||||
|
||||
/* Add it to the free list */
|
||||
q->next = free_timeouts;
|
||||
free_timeouts = q;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Advance to the next timeout */
|
||||
u = q->next;
|
||||
|
||||
/* Update the previous pointer */
|
||||
t = q;
|
||||
}
|
||||
|
||||
/* Advance */
|
||||
q = u;
|
||||
}
|
||||
|
||||
prev = NULL;
|
||||
for (p = protocols; p; p = next) {
|
||||
|
|
Loading…
Reference in a new issue