コード例 #1
0
ファイル: dns_resolver.c プロジェクト: larsonmpdx/grpc
static void dns_maybe_finish_next_locked(dns_resolver *r) {
  if (r->next_completion != NULL &&
      r->resolved_version != r->published_version) {
    *r->target_config = r->resolved_config;
    if (r->resolved_config) {
      grpc_client_config_ref(r->resolved_config);
    }
    grpc_iomgr_add_callback(r->next_completion);
    r->next_completion = NULL;
    r->published_version = r->resolved_version;
  }
}
コード例 #2
0
ファイル: dns_resolver.c プロジェクト: kriswuollett/grpc
static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx,
        dns_resolver *r) {
    if (r->next_completion != NULL &&
            r->resolved_version != r->published_version) {
        *r->target_config = r->resolved_config;
        if (r->resolved_config) {
            grpc_client_config_ref(r->resolved_config);
        }
        grpc_exec_ctx_enqueue(exec_ctx, r->next_completion, true, NULL);
        r->next_completion = NULL;
        r->published_version = r->resolved_version;
    }
}