Skip to content

Commit

Permalink
Clean up gssrpc timeout code
Browse files Browse the repository at this point in the history
Revert b8b7bd6 (for #6120) now that
we are setting the kadmin client timeout the appropriate way.

In clnt_create(), do not set a timeout after creating the handle;
doing so defeats the purpose of keeping track of whether the caller
has set a handle timeout.
  • Loading branch information
greghudson committed Mar 17, 2015
1 parent 11f0cf7 commit e321a9d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/kadm5/clnt/client_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#endif

/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 120, 0 };
static struct timeval TIMEOUT = { 25, 0 };

generic_ret *
create_principal_2(cprinc_arg *argp, CLIENT *clnt)
Expand Down
5 changes: 0 additions & 5 deletions src/lib/rpc/clnt_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,12 @@ clnt_create(
if (client == NULL) {
return (NULL);
}
tv.tv_sec = 120;
clnt_control(client, CLSET_TIMEOUT, &tv);
break;
case IPPROTO_TCP:
client = clnttcp_create(&sockin, prog, vers, &sock, 0, 0);
if (client == NULL) {
return (NULL);
}
tv.tv_sec = 120;
tv.tv_usec = 0;
clnt_control(client, CLSET_TIMEOUT, &tv);
break;
default:
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
Expand Down

0 comments on commit e321a9d

Please sign in to comment.