]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/atp/atp_rresp.c
Remove bdb env on exit
[netatalk.git] / libatalk / atp / atp_rresp.c
index d7f8639e75b38ccd10621b7771599ec0ed1f79bd..ac0a146cb628665f49ea872a04e2453e567a5895 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $Id: atp_rresp.c,v 1.6 2009-10-13 22:55:37 didg Exp $
+ *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -23,7 +25,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdlib.h>
 #include <string.h>
@@ -31,6 +33,7 @@
 #include <sys/time.h>
 #include <errno.h>
 #include <sys/uio.h>
+#include <sys/socket.h>
 
 #include <netatalk/at.h>
 #include <atalk/atp.h>
 
 #ifdef EBUG
 #include <stdio.h>
-#endif
+#endif /* EBUG */
 
 #include "atp_internals.h"
 
 int
-atp_rresp( ah, atpb )
-    ATP                        ah;             /* open atp handle */
-    struct atp_block   *atpb;          /* parameter block */
+atp_rresp(
+    ATP                        ah,             /* open atp handle */
+    struct atp_block   *atpb)          /* parameter block */
 {
-    int                len, i, rc;
+    int                i, rc;
+    size_t     len;
 
 #ifdef EBUG
     atp_print_bufuse( ah, "atp_rresp" );
-#endif
+#endif /* EBUG */
     /* check parameters
     */
     if ( atpb->atp_rresiovcnt <= 0 || atpb->atp_rresiovcnt > 8 ) {
@@ -78,11 +82,11 @@ atp_rresp( ah, atpb )
            return( -1 );
        }
 #ifdef EBUG
-       fprintf( stderr, "atp_rresp copying %d bytes packet %d\n",
+       fprintf( stderr, "atp_rresp copying %ld bytes packet %d\n",
                len, i );
        bprint( (char *)ah->atph_resppkt[ i ]->atpbuf_info.atpbuf_data,
                len + ATP_HDRSIZE );
-#endif
+#endif /* EBUG */
        memcpy(atpb->atp_rresiov[ i ].iov_base,
               ah->atph_resppkt[ i ]->atpbuf_info.atpbuf_data + ATP_HDRSIZE,
               len );