X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-qt%2Fqt-watch.cpp;h=f29b517d0950aa391a1b60380f3e9845ee2b8cc4;hb=acdec2c38860b6bc36328d20f5da6584787a368a;hp=5b49845e5f278da6c802f83e1c5e92085d2ee1c0;hpb=11fdf8612c684b0faf85781ef1b2766bf6ea1f0b;p=catta diff --git a/avahi-qt/qt-watch.cpp b/avahi-qt/qt-watch.cpp index 5b49845..f29b517 100644 --- a/avahi-qt/qt-watch.cpp +++ b/avahi-qt/qt-watch.cpp @@ -177,19 +177,19 @@ static void q_timeout_free(AvahiTimeout *t) delete t; } -static AvahiPoll qt_poll; - const AvahiPoll* avahi_qt_poll_get(void) { - qt_poll.userdata=0; - qt_poll.watch_new = q_watch_new; - qt_poll.watch_free = q_watch_free; - qt_poll.watch_update = q_watch_update; - qt_poll.watch_get_events = q_watch_get_events; - - qt_poll.timeout_new = q_timeout_new; - qt_poll.timeout_free = q_timeout_free; - qt_poll.timeout_update = q_timeout_update; + static const AvahiPoll qt_poll = { + NULL, + q_watch_new, + q_watch_update, + q_watch_get_events, + q_watch_free, + q_timeout_new, + q_timeout_update, + q_timeout_free + }; + return &qt_poll; }