Actions
Bug #4462
closedclnt_vc_control()/clnt_dg_control() could return RPC_FAILED instead of FALSE
Start date:
2014-01-13
Due date:
% Done:
0%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
Both clnt_vc_control() and clnt_dg_control() could return RPC_FAILED instead of FALSE here:
876clnt_vc_control(CLIENT *cl, int request, char *info) 877{ 878 bool_t ret; 879/* LINTED pointer alignment */ 880 struct ct_data *ct = (struct ct_data *)cl->cl_private; 881 882 if (rpc_fd_lock(vctbl, ct->ct_fd)) { 883 rpc_fd_unlock(vctbl, ct->ct_fd); 884 return (RPC_FAILED); 885 }
711static bool_t 712clnt_dg_control(CLIENT *cl, int request, char *info) 713{ 714/* LINTED pointer alignment */ 715 struct cu_data *cu = (struct cu_data *)cl->cl_private; 716 struct netbuf *addr; 717 if (rpc_fd_lock(dgtbl, cu->cu_fd)) { 718 rpc_fd_unlock(dgtbl, cu->cu_fd); 719 return (RPC_FAILED); 720 }
Updated by Marcel Telka over 8 years ago
Both clnt_vc_control() and clnt_dg_control() are internal implementation of clnt_control(3nsl). The clnt_control(3nsl) should return TRUE (success) or FALSE (failure).
The problem is that RPC_FAILED (with value 16) is returned here on failure. So the return value is both invalid and confusing.
Updated by Marcel Telka about 8 years ago
- Status changed from New to In Progress
Updated by Marcel Telka about 8 years ago
- Status changed from In Progress to Pending RTI
Updated by Electric Monk about 8 years ago
git commit 5131caa123fd046a511d18145869507ae9b7b9dd
Author: Marcel Telka <marcel.telka@nexenta.com> 4462 clnt_vc_control()/clnt_dg_control() could return RPC_FAILED instead of FALSE Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Gordon Ross <gwr@nexenta.com>
Updated by Marcel Telka about 8 years ago
- Status changed from Pending RTI to Resolved
- Tags deleted (
needs-triage)
Actions