]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/atp/atp_rsel.c
Remove bdb env on exit
[netatalk.git] / libatalk / atp / atp_rsel.c
index ba05bcd504cf68693a97f417dad9cdc06a6ae1c5..bc6ec56cb88411a831ff8696cd6e4c19c8fb02a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: atp_rsel.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: atp_rsel.c,v 1.6 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1997 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -31,9 +31,8 @@ static int    release_count = 0;
 #endif /* DROP_ATPTREL */
 
 
-int
-resend_request( ah )
-    ATP                ah;
+static int
+resend_request(ATP ah)
 {
     /*
      * update bitmap and send request packet
@@ -41,7 +40,7 @@ resend_request( ah )
     struct atphdr      req_hdr;
 
 #ifdef EBUG
-    printf( "\n<%d> resend_request: resending %d byte request packet",
+    printf( "\n<%d> resend_request: resending %ld byte request packet",
            getpid(), ah->atph_reqpkt->atpbuf_dlen );
     atp_print_addr( " to", &ah->atph_reqpkt->atpbuf_addr );
     putchar( '\n' );
@@ -72,10 +71,10 @@ resend_request( ah )
 }
 
 int
-atp_rsel( ah, faddr, func )
-    ATP                        ah;             /* open atp handle */
-    struct sockaddr_at *faddr;         /* address to receive from */
-    int                        func;           /* which function(s) to wait for;
+atp_rsel( 
+    ATP                        ah,             /* open atp handle */
+    struct sockaddr_at *faddr,         /* address to receive from */
+    int                        func)           /* which function(s) to wait for;
                                           0 means request or response */
 {
     struct atpbuf      *abuf, *pb, *cb;
@@ -178,7 +177,7 @@ timeout :
     bprint( abuf->atpbuf_info.atpbuf_data, recvlen );
 #endif /* EBUG */
 
-    abuf->atpbuf_dlen = recvlen;
+    abuf->atpbuf_dlen = (size_t) recvlen;
     memcpy( &resp_hdr, abuf->atpbuf_info.atpbuf_data + 1,
            sizeof( struct atphdr ));