]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/asp/asp_tickle.c
Ignore object files
[netatalk.git] / libatalk / asp / asp_tickle.c
index a591db4891b319e7633bce5bd93f187d6e49a642..c6f3752634822417bf4b8de31d1b4a8fc6731f5b 100644 (file)
@@ -1,9 +1,24 @@
-#include <syslog.h>
+/*
+ * $Id: asp_tickle.c,v 1.7 2002-12-04 10:59:37 didg Exp $
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#include <string.h>
+#include <atalk/logger.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#include <errno.h>
+
+#include <sys/socket.h>
 #include <atalk/atp.h>
 #include <atalk/asp.h>
 
 /* send off a tickle */
-void asp_tickle(ASP asp, const u_int8_t sid, struct sockaddr_at *sat)
+int asp_tickle(ASP asp, const u_int8_t sid, struct sockaddr_at *sat)
 {
   struct atp_block atpb;
   char buf[ASP_HDRSIZ];
@@ -18,6 +33,8 @@ void asp_tickle(ASP asp, const u_int8_t sid, struct sockaddr_at *sat)
   atpb.atp_sreqto = 0;
   atpb.atp_sreqtries = 1;
   if ( atp_sreq( asp->asp_atp, &atpb, 0, 0 ) < 0 ) {
-    syslog( LOG_ERR, "atp_sreq: %m" );
+    LOG(log_error, logtype_default, "atp_sreq: %s", strerror(errno) );
+    return 0;
   }
+  return 1;
 }