diff options
| author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-10-03 07:59:27 +0000 | 
|---|---|---|
| committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-10-03 07:59:27 +0000 | 
| commit | 38c49f9cc0d58ad192d5ada78082184b3f7c2e3c (patch) | |
| tree | 2d34dc5d4d52c127401ca175a07eae148e43d1c6 | |
| parent | 1f30b595befc80f19634df16a68037efc4e3bf3a (diff) | |
 * merged fix from rev 667,668,669
git-svn-id: file:///home/lennart/svn/public/avahi/branches/working-0.5.x@675 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
| -rw-r--r-- | avahi-common/Makefile.am | 2 | ||||
| -rw-r--r-- | avahi-common/watch.h | 2 | ||||
| -rw-r--r-- | avahi-qt/qt-watch.cpp | 7 | 
3 files changed, 5 insertions, 6 deletions
| diff --git a/avahi-common/Makefile.am b/avahi-common/Makefile.am index a580a9d..133d165 100644 --- a/avahi-common/Makefile.am +++ b/avahi-common/Makefile.am @@ -63,7 +63,7 @@ libavahi_common_la_SOURCES = \  	watch.h gccmacro.h  libavahi_common_la_CFLAGS = $(AM_CFLAGS) -libavahi_common_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_COMMON_VERSION_INFO) 1:0:1 +libavahi_common_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_COMMON_VERSION_INFO)  strlst_test_SOURCES = \  	strlst.c strlst.h \ diff --git a/avahi-common/watch.h b/avahi-common/watch.h index 7bab4f8..9f82729 100644 --- a/avahi-common/watch.h +++ b/avahi-common/watch.h @@ -36,7 +36,7 @@ AVAHI_C_DECL_BEGIN  /** An I/O watch object */  typedef struct AvahiWatch AvahiWatch; -/** An I/O watch object */ +/** A timeout watch object */  typedef struct AvahiTimeout AvahiTimeout;  /** An event polling abstraction object */ diff --git a/avahi-qt/qt-watch.cpp b/avahi-qt/qt-watch.cpp index c0b2140..2426798 100644 --- a/avahi-qt/qt-watch.cpp +++ b/avahi-qt/qt-watch.cpp @@ -125,12 +125,11 @@ void AvahiTimeout::update(const struct timeval *tv)  {      m_timer.stop();      if (tv) { -        struct timeval now; -        gettimeofday(&now, 0); +    AvahiUsec u = avahi_age(tv)/1000;  #ifdef QT4 -        m_timer.start((tv->tv_sec-now.tv_sec)*1000+(tv->tv_usec-now.tv_usec)/1000); +    m_timer.start( (u>0) ? 0 : -u);  #else -        m_timer.start((tv->tv_sec-now.tv_sec)*1000+(tv->tv_usec-now.tv_usec)/1000,true); +    m_timer.start( (u>0) ? 0 : -u,true);  #endif      }  } | 
