Skip to content
Snippets Groups Projects
Commit 7851ea37 authored by Craig Tiller's avatar Craig Tiller
Browse files

Fixes

parent 9fa2ec6d
No related branches found
No related tags found
No related merge requests found
......@@ -121,9 +121,8 @@ void grpc_executor_push(grpc_closure *closure, grpc_error *error) {
gpr_mu_unlock(&g_executor.mu);
}
void grpc_executor_shutdown() {
void grpc_executor_shutdown(grpc_exec_ctx *exec_ctx) {
int pending_join;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_mu_lock(&g_executor.mu);
pending_join = g_executor.pending_join;
......@@ -133,8 +132,7 @@ void grpc_executor_shutdown() {
* list below because we aren't accepting new work */
/* Execute pending callbacks, some may be performing cleanups */
grpc_exec_ctx_enqueue_list(&exec_ctx, &g_executor.closures, NULL);
grpc_exec_ctx_finish(&exec_ctx);
grpc_exec_ctx_enqueue_list(exec_ctx, &g_executor.closures, NULL);
GPR_ASSERT(grpc_closure_list_empty(g_executor.closures));
if (pending_join) {
gpr_thd_join(g_executor.tid);
......
......@@ -270,7 +270,7 @@ int gpr_stricmp(const char *a, const char *b) {
static void add_string_to_split(const char *beg, const char *end, char ***strs,
size_t *nstrs, size_t *capstrs) {
char *out = gpr_malloc((size_t)(end - beg) + 1);
memcpy(out, beg, end - beg);
memcpy(out, beg, (size_t)(end - beg));
out[end - beg] = 0;
if (*nstrs == *capstrs) {
*capstrs = GPR_MAX(8, 2 * *capstrs);
......
......@@ -314,7 +314,8 @@ static const grpc_channel_filter test_server_filter = {
* Registration
*/
static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
static bool maybe_add_filter(grpc_exec_ctx *exec_ctx,
grpc_channel_stack_builder *builder, void *arg) {
grpc_channel_filter *filter = arg;
if (g_enable_filter) {
// Want to add the filter as close to the end as possible, to make
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment