Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Properly check tidc_send_request return value
tidc_send_request returns -1 on failure and 0 on success.
For some reason during the writing of the rekeying code this comparison was switched. Fixing.
  • Loading branch information
alejandro-perez committed Aug 21, 2018
1 parent 9304f13 commit 273f3b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/rlm_realm/trustrouter.c
Expand Up @@ -144,7 +144,7 @@ static bool tidc_send_recv(const char *trustrouter, int port, const char *rpreal
/* Send TIDC request */
rcode = tidc_send_request(global_tidc, conn, gssctx, (char *) rprealm, (char *) realm_name,
(char *) community, &tr_response_func, cookie);
if (rcode > 0) {
if (rcode < 0) {
DEBUG2("Error in tidc_send_request, rc = %d.", rcode);
return false;
}
Expand Down

0 comments on commit 273f3b3

Please sign in to comment.