This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.1'.
[unix-history] / sys / nfs / nfs_socket.c
index cf23d4a..f3c3c88 100644 (file)
@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *     From:   @(#)nfs_socket.c        7.23 (Berkeley) 4/20/91
  * SUCH DAMAGE.
  *
  *     From:   @(#)nfs_socket.c        7.23 (Berkeley) 4/20/91
- *     $Id$
+ *     $Id: nfs_socket.c,v 1.5 1994/05/03 17:49:16 davidg Exp $
  */
 
 /*
  */
 
 /*
@@ -479,7 +479,7 @@ tryagain:
                        }
                        if (error)
                                goto errout;
                        }
                        if (error)
                                goto errout;
-                       len = ntohl(len) & ~0x80000000;
+                       len = ntohl(len) & ~0x80000000ul;
                        /*
                         * This is SERIOUS! We are out of sync with the sender
                         * and forcing a disconnect/reconnect is all I can do.
                        /*
                         * This is SERIOUS! We are out of sync with the sender
                         * and forcing a disconnect/reconnect is all I can do.
@@ -810,7 +810,7 @@ nfs_request(vp, mreq, xid, procnum, procp, tryhard, mp, mrp, mdp, dposp)
         */
        if ((nmp->nm_soflags & PR_ATOMIC) == 0) {
                M_PREPEND(mreq, sizeof(u_long), M_WAIT);
         */
        if ((nmp->nm_soflags & PR_ATOMIC) == 0) {
                M_PREPEND(mreq, sizeof(u_long), M_WAIT);
-               *mtod(mreq, u_long *) = htonl(0x80000000 | len);
+               *mtod(mreq, u_long *) = htonl(0x80000000ul | len);
        }
        rep->r_mreq = mreq;
 
        }
        rep->r_mreq = mreq;
 
@@ -971,6 +971,8 @@ nfs_getreq(so, prog, vers, maxproc, nam, mrp, mdp, dposp, retxid, procnum, cr,
        }
        if (error)
                return (error);
        }
        if (error)
                return (error);
+       if (!mrep)
+               return (EBADRPC);
        md = mrep;
        mrep = nfs_uncompress(mrep);
        if (mrep != md) {
        md = mrep;
        mrep = nfs_uncompress(mrep);
        if (mrep != md) {