From: Ralph Boehme Date: Thu, 18 Apr 2013 08:51:59 +0000 (+0200) Subject: Don't check for pending event if no FCE listeners are configured X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=aaa6393ef2fc5f9726917e0a4e9b8eeaff52f631;hp=59610cb40b09de7eb3201d1b3e1a3392d5b78235 Don't check for pending event if no FCE listeners are configured Eliminates one time() syscall for every AFP transaction. From FR #78. --- diff --git a/etc/afpd/fce_api.c b/etc/afpd/fce_api.c index 36cce446..46203789 100644 --- a/etc/afpd/fce_api.c +++ b/etc/afpd/fce_api.c @@ -424,6 +424,8 @@ static void check_saved_close_events(int fmodwait) * */ void fce_pending_events(AFPObj *obj) { + if (!udp_sockets) + return; check_saved_close_events(obj->options.fce_fmodwait); }