]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/asp/asp_attn.c
Previous fix 9e4e07c1811edbaf3376ad6e238a1353b405002b resulted in the inability to...
[netatalk.git] / libatalk / asp / asp_attn.c
index 0305b3d1be281c113ceedd02f6a249603306ffd6..1c2a8fa63e00bedeec73912f997e5738e1527e32 100644 (file)
@@ -1,17 +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
+#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>
@@ -40,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;
@@ -49,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;
 }