Diff for /libaitio/example/recvfile.c between versions 1.2 and 1.3

version 1.2, 2011/12/13 02:23:07 version 1.3, 2013/06/26 22:48:53
Line 1 Line 1
 #include <stdio.h>  #include <stdio.h>
   #include <unistd.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/socket.h>  #include <sys/socket.h>
 #include <netinet/in.h>  #include <netinet/in.h>
   #include <arpa/inet.h>
 #include <aitio.h>  #include <aitio.h>
   
   
Line 37  main(int argc, char **argv) Line 39  main(int argc, char **argv)
                 return 4;                  return 4;
         }          }
   
        if ((c = accept(s, &sa, &sl)) != -1) {        if ((c = accept(s, &sa, (socklen_t*) &sl)) != -1) {
                sl = ioRecvFile(c, argv[1], strtol(argv[2], NULL, 0), 0644, argv[3] ? strtol(argv[3], NULL, 0) : 0);                sl = ioRecvFile(c, argv[1], strtol(argv[2], NULL, 0), 0644, 
                                 argv[3] ? strtol(argv[3], NULL, 0) : 0);
                 printf("received %d bytes\n", sl);                  printf("received %d bytes\n", sl);
                 if (!sl)                  if (!sl)
                         printf("#%d - %s\n", io_GetErrno(), io_GetError());                          printf("#%d - %s\n", io_GetErrno(), io_GetError());

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>