radcli_ctx_apply(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… radcli_ctx_apply β€” the "okay bestie, lock it in" moment

So like, this page lives in section 3 of the Radius client library manpages, and honestly? It's giving finishing touches. Let's get into it. ✨


✨ NAME ✨

radcli_ctx_apply β€” bestie, this is the one that validates all the options you've set so far and then initialises the transport. No cap, that's the whole job. πŸŽ€


🌸 SYNOPSIS 🌸

#include <radcli/>

int radcli_ctx_apply(
    radcli_ctx  *ctx
);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: you call this once β€” literally once, and after you've made all your radcli_ctx_set_opt_str() / _set_opt_int() calls for ctx. What it does is activate the configuration, and like... ctx is not usable for a request before this succeeds. That's the vibe check. Fail it and your context is just sitting there, unconfigured, not doing main character energy. 😭

Also important, and I cannot stress this enough: radcli_ctx_read_config() calls this internally. So if you got your context that way, do not call it again on that context. It's already been applied. Periodt. πŸ’…


πŸ’– PARAMETERS πŸ’–

  • ctx β€” a context that you configured via radcli_ctx_set_opt_str() / _set_opt_int(). That's it, that's the parameter. 🫢

⭐ RETURN VALUE ⭐

  • 0 on success β€” slay, you can go make requests now πŸ”₯
  • -1 on failure β€” like when there's no authserver configured, or radius_timeout / radius_retries are invalid πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page bestie, ily, go apply your context πŸ’œ

This iconic little number is brought to you by radcli, dated 2026-10-10. Go forth and configure responsibly. πŸ§šπŸ“
πŸ“¦ where this page comes from