Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-3954: C client: GCC 10 compilation fixes #1487

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions zookeeper-client/zookeeper-client-c/src/zookeeper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1927,23 +1927,23 @@ void free_completions(zhandle_t *zh,int callCompletion,int reason)
}
}
}
if (zoo_lock_auth(zh) == 0) {
a_list.completion = NULL;
a_list.next = NULL;

get_auth_completions(&zh->auth_h, &a_list);
zoo_unlock_auth(zh);
zoo_lock_auth(zh);
a_list.completion = NULL;
a_list.next = NULL;
get_auth_completions(&zh->auth_h, &a_list);
zoo_unlock_auth(zh);

a_tmp = &a_list;
// chain call user's completion function
while (a_tmp->completion != NULL) {
auth_completion = a_tmp->completion;
auth_completion(reason, a_tmp->auth_data);
a_tmp = a_tmp->next;
if (a_tmp == NULL)
break;
}
a_tmp = &a_list;
// chain call user's completion function
while (a_tmp->completion != NULL) {
auth_completion = a_tmp->completion;
auth_completion(reason, a_tmp->auth_data);
a_tmp = a_tmp->next;
if (a_tmp == NULL)
break;
}

free_auth_completion(&a_list);
}

Expand Down