[avahi] avahi_threaded_poll_start strange behaviour

Gaspard Bucher gaspard at teti.ch
Wed May 13 05:03:56 PDT 2009


Here is a stripped down version of my class that can be used to
reproduce the bug. Compile and test with:

$ g++ -g -Wall -lavahi-client -o test registration.cpp
$ ./test

On Wed, May 13, 2009 at 12:31 PM, Gaspard Bucher <gaspard at teti.ch> wrote:
> As I understand "avahi_threaded_poll_start", the new thread should be
> running if the return value is 0.
>
> What I get:
>
> return value = 0
> threaded_poll->thread_running = 0
>
> But the thread is in fact running since the service registration works
> and I see the thread in gdb.
>
> Reading the source code in thread-watch.c, this seems impossible...
>
> I discovered the problem because "avahi_threaded_poll_stop" would
> return -1 and the poll thread would keep on running.
>
> Any clue ? C++ related ?
>
> Gaspard
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: registration.cpp
Type: application/octet-stream
Size: 6774 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/avahi/attachments/20090513/02f5e268/attachment.obj 


More information about the avahi mailing list