diff mbox

xdr_rejected_reply: Don't crash with invalid server rejection

Message ID 1401976096-16802-1-git-send-email-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson June 5, 2014, 1:48 p.m. UTC
It seems legacy servers like to return invalid
rejection status when a RPC is rejected. This
should not crash the app then it happens.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 src/rpc_prot.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Steve Dickson June 18, 2014, 8:44 p.m. UTC | #1
On 06/05/2014 09:48 AM, Steve Dickson wrote:
> It seems legacy servers like to return invalid
> rejection status when a RPC is rejected. This
> should not crash the app then it happens.
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed.... 

steved.

> ---
>  src/rpc_prot.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/rpc_prot.c b/src/rpc_prot.c
> index e562deb..5841e51 100644
> --- a/src/rpc_prot.c
> +++ b/src/rpc_prot.c
> @@ -150,7 +150,6 @@ xdr_rejected_reply(xdrs, rr)
>  		return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
>  	}
>  	/* NOTREACHED */
> -	assert(0);
>  	return (FALSE);
>  }
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/rpc_prot.c b/src/rpc_prot.c
index e562deb..5841e51 100644
--- a/src/rpc_prot.c
+++ b/src/rpc_prot.c
@@ -150,7 +150,6 @@  xdr_rejected_reply(xdrs, rr)
 		return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
 	}
 	/* NOTREACHED */
-	assert(0);
 	return (FALSE);
 }