Magellan Linux

Diff of /trunk/mkinitrd-magellan/klibc/usr/kinit/nfsmount/sunrpc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC revision 1297 by niro, Fri May 27 15:12:11 2011 UTC
# Line 1  Line 1 
1  #include <sys/types.h>  #include <sys/types.h>
2  #include <sys/socket.h>  #include <sys/socket.h>
3  #include <netinet/in.h>  #include <netinet/in.h>
 #include <errno.h>  
4  #include <poll.h>  #include <poll.h>
5  #include <stdio.h>  #include <stdio.h>
6  #include <string.h>  #include <string.h>
# Line 55  static void rpc_header(struct client *cl Line 54  static void rpc_header(struct client *cl
54  {  {
55   (void)clnt;   (void)clnt;
56    
57   rpc->call->hdr.frag_hdr = htonl(LAST_FRAG | rpc->call_len);   rpc->call->hdr.frag_hdr = htonl(LAST_FRAG | (rpc->call_len - 4));
58   rpc->call->hdr.udp.xid = lrand48();   rpc->call->hdr.udp.xid = lrand48();
59   rpc->call->hdr.udp.msg_type = htonl(RPC_CALL);   rpc->call->hdr.udp.msg_type = htonl(RPC_CALL);
60   rpc->call->rpc_vers = htonl(2);   rpc->call->rpc_vers = htonl(2);
# Line 120  static int rpc_call_udp(struct client *c Line 119  static int rpc_call_udp(struct client *c
119   goto bail;   goto bail;
120   }   }
121   if (ret == 0) {   if (ret == 0) {
122   DEBUG(("Timeout #%d\n", i + 1));   dprintf("Timeout #%d\n", i + 1);
123   break;   break;
124   }   }
125   if ((ret = rpc_do_reply(clnt, rpc, UDP_HDR_OFF)) == 0) {   if ((ret = rpc_do_reply(clnt, rpc, UDP_HDR_OFF)) == 0) {
126   goto done;   goto done;
127   } else {   } else {
128   DEBUG(("Failed on try #%d - retrying\n",   dprintf("Failed on try #%d - retrying\n",
129         i + 1));   i + 1);
130   }   }
131   }   }
132   }   }

Legend:
Removed from v.532  
changed lines
  Added in v.1297