Skip to content

Commit

Permalink
chore: assert lb_mode success
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhuyan committed Sep 19, 2024
1 parent f3e5cc3 commit 9500e6d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions c_src/quicer_nif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,19 +1197,20 @@ openLib(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
global_settings.LoadBalancingMode
= QUIC_LOAD_BALANCING_SERVER_ID_FIXED;
global_settings.FixedServerID = lb_mode;
MsQuic->SetParam(NULL,
QUIC_PARAM_GLOBAL_GLOBAL_SETTINGS,
sizeof(global_settings),
&global_settings);
status = MsQuic->SetParam(NULL,
QUIC_PARAM_GLOBAL_GLOBAL_SETTINGS,
sizeof(global_settings),
&global_settings);
}
else
{
MsQuic->SetParam(NULL,
QUIC_PARAM_GLOBAL_LOAD_BALACING_MODE,
sizeof(uint16_t),
(uint16_t *)&lb_mode);
status = MsQuic->SetParam(NULL,
QUIC_PARAM_GLOBAL_LOAD_BALACING_MODE,
sizeof(uint16_t),
(uint16_t *)&lb_mode);
}
}
assert(QUIC_SUCCEEDED(status));

if (enif_get_map_value(env, argv[0], ATOM_TRACE, &eterm)
&& enif_get_string(env, eterm, lttngPath, PATH_MAX, ERL_NIF_LATIN1))
Expand Down

0 comments on commit 9500e6d

Please sign in to comment.