[avahi] Mono-bindings: ServiceResolver not resolving...

Sebastien Estienne sebastien.estienne at gmail.com
Mon Oct 3 11:24:32 PDT 2005


Hi celso,

you could come on Irc to discuss the issue with the developers:
server: irc.freenode.org
channel: #avahi

regards,

2005/10/3, Celso Pinto <cpinto at yimports.com>:
> Hi again folks,
>
> in yet another moment of total desperation, I added some debugging
> output to avahi-sharp and here are the results (please find the patch
> for this in the attachments):
>
> Use-case 1, user cpinto runs application with ServiceBrowser and
> EntryGroup. The output is:
> [cpinto at starfish ~/tmp/avahi/avahi-sharp]# ifolder
> Nr of Processes: 2
> SimiasApp
> Listening on port: 32775
> Listening on address: 0.0.0.0
> Root directory: /usr/local/bin
> Hit Return to stop the server.
> Simias Application Path: /usr/local/web/bin
> Simias Process Starting
> AV: Start()
>   client.Handle == null : False
>   handle != null : False
>   addListeners.Count : 1
>   removeListeners.Count : 0
> AV: Start() out
> AV: Start()
>   client.Handle == null : False
>   handle != null : True
>   addListeners.Count : 1
>   removeListeners.Count : 1
> Simias Process Running
>
>
> Use-case nr 2, user clean executes ifolder (the application) after user
> cpinto. Output is:
> clean at starfish:~$ ifolder
> Nr of Processes: 1
> SimiasApp
> Listening on port: 32825
> Listening on address: 0.0.0.0
> Root directory: /usr/local/bin
> Hit Return to stop the server.
> Simias Application Path: /usr/local/web/bin
> Simias Process Starting
> AV: Start()
>   client.Handle == null : False
>   handle != null : False
>   addListeners.Count : 1
>   removeListeners.Count : 0
> AV: OnServiceBrowserCallback()
> AV: service added
> Notifying listener of add service
> AV: Start() out
> AV: Start()
>   client.Handle == null : False
>   handle != null : True
>   addListeners.Count : 1
>   removeListeners.Count : 1
> Simias Process Running
> AV: OnServiceBrowserCallback()
> AV: service added
> Notifying listener of add service
>
>
> What I make of this is that OnServiceCallback is never invoked for the
> service added by user "clean" (the second user), which suggests that
> there may be a bug in the C# bindings for Avahi.
>
>
> Is anyone else already using Avahi in a C# application?
>
> Cheers,
> Celso
>
>
>
> On Seg, 2005-10-03 at 16:33 +0100, Celso Pinto wrote:
> > Hi James,
> >
> > holding references to ServiceResolver instances outside the scope of the
> > methods that create those instances didn't solve this problem.
> >
> > Running "avahi-browse -a" all services show up, but I'm still failing to
> > see what may be wrong with the code.
> >
> > I'm going to try avahi-discover though and see what comes up, if
> > anything.
> >
> > Cheers,
> > Celso
> >
> > On Sex, 2005-09-30 at 13:47 -0500, James Willcox wrote:
> > > Hi Celso,
> > >
> > > I looked at the .cs file you attached, and I see why you don't get a
> > > resolver event.  When you create the service resolver, you don't store
> > > any references to it outside the scope of the handleServiceAdded method
> > > (and the same thing happens in another method too).  Consequently, the
> > > object is eligible for garbage collection when that method ends.  It is
> > > evidently getting collected before you receive the event.  I don't know
> > > why the browser would not be showing the other machine, though.  Does it
> > > show up in avahi-discover?
> > >
> > > James
> > >
> > > On Fri, 2005-09-30 at 10:00 +0100, Celso Pinto wrote:
> > > > Hi,
> > > >
> > > > > > - second user launches the application, publishes the service, first
> > > > > > user is notified, listens for publishers. Never finds out about 1st
> > > > > > user.
> > > > >
> > > > > Why doesn't he find out about the first user? Is this a bug in Avahi
> > > > > or intended behaviour? I still don't understand. :-(
> > > >
> > > > My opinion is that apparently it's an Avahi bug (of course ;-))
> > > >
> > > > > > > Is that Avahi 0.5 or SVN?
> > > > >
> > > > > > Downloaded from SVN on the 26th.
> > > > >
> > > > > Hrmm. The were some changes in SVN recently where the c# stuff wasn't
> > > > > up-to-date with the client library in regards to method
> > > > > signatures.
> > > > >
> > > > > Please update to avahi 0.5.1.
> > > > >
> > > > > (Current SVN is broken regarding avahi-sharp too)
> > > >
> > > > Will do.
> > > >
> > > >
> > > > > Hmm, thanks. Honestly I cannot make much sense of the ethereal
> > > > > snapshot. I cannot distuinguish which query was issued by which client
> > > > > app. Is there any chance that you could repeat this stuff on two
> > > > > seperate hosts with different IP addresses?
> > > >
> > > > Sure thing, but it'll take me some time as I need to install a Linux
> > > > image in QEmu.
> > > >
> > > > Regards,
> > > > Celso
> > > >
> > > > _______________________________________________
> > > > avahi mailing list
> > > > avahi at lists.freedesktop.org
> > > > http://lists.freedesktop.org/mailman/listinfo/avahi
> > >
> > > _______________________________________________
> > > avahi mailing list
> > > avahi at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/avahi
> > _______________________________________________
> > avahi mailing list
> > avahi at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/avahi
> --
> Celso Pinto <cpinto at yimports.com>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQBDQWv6npyORLBtWxwRAjjPAKDTgfS43UIGgm8rmoQ1Ktir0CAiqQCgiy66
> IDbamzcox/bP5PKqxn7zKvs=
> =szbx
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/avahi
>
>
>
>


--
Sebastien Estienne


More information about the avahi mailing list