[Bug 5954] res_nclose never returns

bugzilla at busybox.net bugzilla at busybox.net
Wed Feb 20 12:54:40 UTC 2013


https://bugs.busybox.net/show_bug.cgi?id=5954

--- Comment #4 from Bernhard Reutner-Fischer <aldot at uclibc.org> 2013-02-20 12:55:02 UTC ---
Created attachment 4778
  --> https://bugs.busybox.net/attachment.cgi?id=4778
bug-5954b.patch

Wouldn't we need to also clear that res_state that you pass in like in the
b.patch?
Consider your testcase:

#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#include <netdb.h>
#include <assert.h>

int main(int argc, char **argv)
{
    int r;
    struct __res_state state;

    r = res_ninit(&state);
    if (r < 0)
        herror("init");
    printf("Initialised\n");
#ifdef __UCLIBC__
    assert (state._u._ext.nscount >= 0);
#else
    /* Looks like glibc did not populate the nameservers yet,
       perhaps since there was no query yet? FIX the testcase,
       make a query against that user-res-state..
     */
    assert (state._u._ext.nscount == 0);
#endif
    res_nclose(&state);

    printf("Closed\n");
    assert (state._u._ext.nscount == 0);

    return 0;
}

That connman application does odd things, i guess it should not need to do that
at all in the first place..

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list