]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/asp/asp_attn.c
Big configure.in cleanup
[netatalk.git] / libatalk / asp / asp_attn.c
index 9aa95bdd96aa4aa2e50173e0711bf981d2b2cb06..1c2a8fa63e00bedeec73912f997e5738e1527e32 100644 (file)
@@ -1,13 +1,20 @@
 /*
+ * $Id: asp_attn.c,v 1.7 2002-12-04 10:59:37 didg Exp $
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+
 #include <stdio.h>
 #include <string.h>
-#include <syslog.h>
+#include <atalk/logger.h>
+#include <errno.h>
 #include <sys/types.h>
 #include <sys/uio.h>
+#include <sys/socket.h>
 
 #include <atalk/atp.h>
 #include <atalk/asp.h>
@@ -36,8 +43,8 @@ int asp_attention(ASP asp, AFPUserBytes flags)
     atpb.atp_sreqtries = 5;
 
     if ( atp_sreq( asp->asp_atp, &atpb, 1, 0 ) < 0 ) {
-       syslog( LOG_ERR, "atp_sreq: %m" );
-       return -1;
+       LOG(log_error, logtype_default, "atp_sreq: %s", strerror(errno) );
+       return 0;
     }
 
     iov[ 0 ].iov_base = data;
@@ -45,9 +52,9 @@ int asp_attention(ASP asp, AFPUserBytes flags)
     atpb.atp_rresiov = iov;
     atpb.atp_rresiovcnt = sizeof( iov )/sizeof( iov[ 0 ] );
     if ( atp_rresp( asp->asp_atp, &atpb ) < 0 ) {
-       syslog( LOG_ERR, "atp_rresp: %m" );
-       return -1;
+       LOG(log_error, logtype_default, "atp_rresp: %s", strerror(errno) );
+       return 0;
     }
 
-    return 0;
+    return 1;
 }