/*
+ * $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>
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;
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;
}