View | Details | Raw Unified | Return to bug 20874 | Differences between
and this patch

Collapse All | Expand All

(-)a/resolv/gai_notify.c (+13 lines)
Lines 98-109 internal_function Link Here
98
__gai_notify (struct requestlist *req)
98
__gai_notify (struct requestlist *req)
99
{
99
{
100
  struct waitlist *waitlist;
100
  struct waitlist *waitlist;
101
  struct waitlist *lastp;
101
102
102
  /* Now also notify possibly waiting threads.  */
103
  /* Now also notify possibly waiting threads.  */
104
  lastp = NULL;
103
  waitlist = req->waiting;
105
  waitlist = req->waiting;
104
  while (waitlist != NULL)
106
  while (waitlist != NULL)
105
    {
107
    {
106
      struct waitlist *next = waitlist->next;
108
      struct waitlist *next = waitlist->next;
109
      int removed = 0;
107
110
108
      if (waitlist->sigevp == NULL)
111
      if (waitlist->sigevp == NULL)
109
	{
112
	{
Lines 122-132 __gai_notify (struct requestlist *req) Link Here
122
	if (--*waitlist->counterp == 0)
125
	if (--*waitlist->counterp == 0)
123
	  {
126
	  {
124
	    __gai_notify_only (waitlist->sigevp, waitlist->caller_pid);
127
	    __gai_notify_only (waitlist->sigevp, waitlist->caller_pid);
128
129
            /* Remove from the request's waitlist */
130
            if (lastp != NULL)
131
              lastp->next = next;
132
            else
133
              req->waiting = next;
134
            removed = 1;
135
125
	    /* This is tricky.  See getaddrinfo_a.c for the reason why
136
	    /* This is tricky.  See getaddrinfo_a.c for the reason why
126
	       this works.  */
137
	       this works.  */
127
	    free ((void *) waitlist->counterp);
138
	    free ((void *) waitlist->counterp);
128
	  }
139
	  }
129
140
141
      if (!removed)
142
        lastp = waitlist;
130
      waitlist = next;
143
      waitlist = next;
131
    }
144
    }
132
}
145
}
(-)a/resolv/gai_suspend.c (-3 / +1 lines)
Lines 111-118 gai_suspend (const struct gaicb *const list[], int ent, Link Here
111
      /* Now remove the entry in the waiting list for all requests
111
      /* Now remove the entry in the waiting list for all requests
112
	 which didn't terminate.  */
112
	 which didn't terminate.  */
113
      for (cnt = 0; cnt < ent; ++cnt)
113
      for (cnt = 0; cnt < ent; ++cnt)
114
	if (list[cnt] != NULL && list[cnt]->__return == EAI_INPROGRESS
114
	if (list[cnt] != NULL && requestlist[cnt] != NULL)
115
	    && requestlist[cnt] != NULL)
116
	  {
115
	  {
117
	    struct waitlist **listp = &requestlist[cnt]->waiting;
116
	    struct waitlist **listp = &requestlist[cnt]->waiting;
118
117
119
- 

Return to bug 20874