Re: [gnet-dev] Async bug with GLib 2.0?



Hans,

Sorry about the delay...

The test works fine on my machine.  'dnstest localhost async' and 'dnstest
127.0.0.1 async' both work.  I'm still using GLib 1.2, though I don't
think it should matter.

There was an issue with older versions of gnet (1.1.0) where doing an
async lookup on 127.0.0.1 or localhost would cause the callback to be
called immediately.  Now the callback is always called via the main loop.
Are you sure you're linking with the latest version and not an older
version that may be installed?

The includes in the examples are relative to an installed GNet, not the
GNet source, so they can't be built automatically.  It's annoying for
testing GNet, but I think it more useful for those programming using GNet.
I don't know of a good way to get them to build automatically without
creating static links to get the includes to work and that seems like too
much of a hack.

David


On 13 Jun 2002, Hans Petter Jansson wrote:

> Hi. I was porting a library to use GLib 2.0, and this library also
> depends on GNet. It seems I have found a bug in the GNet 1.1.4 release
> which is preventing me from using it with GLib 2.0, even though it
> builds fine. After checking the archives for this list, I wonder if it
> isn't the async DNS lookup bug reincarnate.
>
> The problem is that when using gnet_tcp_socket_connect_async (), the
> function returns a valid context, but I never get any callback. I've
> tried to connect to both "localhost" and "127.0.0.1" with the same
> result. Whether there is a process listening on the port I try to
> connect to or not makes no difference.
>
> This also affects tests/dnstest and examples/echoclient that come with
> GNet, but only in async mode. Listener sockets seem to work fine, I get
> callbacks when connecting to them.
>
> I've confirmed this with GNet 1.1.4 and GLib 2.0.0 and 2.0.3. It works
> fine if linked with GLib 1.2.10.
>
> Oh, and while I'm at it, I'll also recommend linking the examples with
> the uninstalled library - I'm not sure the `gnet-config --(libs|cflags)`
> has any educational value.
>
>

-- 
      __          _    __ David Helder - dhelder umich edu
  ___/ /__ __  __(_)__/ / <http://www.eecs.umich.edu/~dhelder>
 / _  / _ `/ |/ / / _  /  Jungle Monkey: <http://www.junglemonkey.net>
 |_,_/|_,_/|___/_/|_,_/   Paper CD Case: <http://www.papercdcase.com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]