summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-15 16:07:29 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-15 16:07:29 +0000
commit7ada090e70d25937d27b2e93b0dab4d9d68c5d23 (patch)
tree6d1da099d6b621b442e7a775783c752be182b186 /avahi-core
parentfe367caf27dd022258218a768da1ae2ddd246203 (diff)
* fix a bad memory access bug in avahi_strndup()
* some small optimizations to call gettimeofday() less often * fix dbus-watch-glue to call dbus_connection_dispatch() git-svn-id: file:///home/lennart/svn/public/avahi/trunk@333 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/iface.c2
-rw-r--r--avahi-core/timeeventq.c14
2 files changed, 11 insertions, 5 deletions
diff --git a/avahi-core/iface.c b/avahi-core/iface.c
index 3d90657..b2c52f9 100644
--- a/avahi-core/iface.c
+++ b/avahi-core/iface.c
@@ -507,7 +507,7 @@ static void netlink_callback(AvahiNetlink *nl, struct nlmsghdr *n, void* userdat
m->list = LIST_ADDR;
} else {
m->list = LIST_DONE;
- avahi_log_debug("Networ interface enumeration completed");
+ avahi_log_debug("Network interface enumeration completed");
}
} else if (n->nlmsg_type == NLMSG_ERROR && (n->nlmsg_seq == m->query_link_seq || n->nlmsg_seq == m->query_addr_seq)) {
diff --git a/avahi-core/timeeventq.c b/avahi-core/timeeventq.c
index 5e24ba3..a259ba6 100644
--- a/avahi-core/timeeventq.c
+++ b/avahi-core/timeeventq.c
@@ -70,14 +70,14 @@ static void update_timeout(AvahiTimeEventQueue *q) {
}
static void expiration_event(AvahiTimeout *timeout, void *userdata) {
- struct timeval now;
AvahiTimeEventQueue *q = userdata;
AvahiTimeEvent *e;
- gettimeofday(&now, NULL);
-
if ((e = avahi_time_event_queue_root(q))) {
+ struct timeval now;
+ gettimeofday(&now, NULL);
+
/* Check if expired */
if (avahi_timeval_compare(&now, &e->expiry) >= 0) {
@@ -88,9 +88,13 @@ static void expiration_event(AvahiTimeout *timeout, void *userdata) {
/* Run it */
assert(e->callback);
e->callback(e, e->userdata);
- }
+
+ update_timeout(q);
+ return;
+ }
}
+ avahi_log_debug(__FILE__": Strange, expiration_event() called, but nothing really happened.");
update_timeout(q);
}
@@ -98,6 +102,8 @@ static void fix_expiry_time(AvahiTimeEvent *e) {
struct timeval now;
assert(e);
+ return; /*** DO WE REALLY NEED THIS? ***/
+
gettimeofday(&now, NULL);
if (avahi_timeval_compare(&now, &e->expiry) > 0)