gnutls_db_set_remove_function(3)

✨ gnutls_db_set_remove_function(3) β€” the gnutls manual, bestie edition ✨

okay so you're deep in the gnutls docs and you found this lil guy πŸ’… it's an API function, it lives in the gnutls manual, and honestly? it's giving "cleanup crew energy." let's get into it 🧹✨


🌸 NAME 🌸

gnutls_db_set_remove_function β€” API function. that's it, that's the name, short and iconic πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/gnutls.h>

void gnutls_db_set_remove_function(gnutls_session_t session,
gnutls_db_remove_func rem_func);

copy it exactly like that, no cap. the indentation wrap is just how the page do πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” is a gnutls_session_t type. yes bestie, it's the session, it's always the session πŸ™ˆ
  • gnutls_db_remove_func rem_func β€” is the function. the one you're handing over. the removal specialist πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

so what are we actually doing here? you're setting the function that's gonna be used to remove data from the resumed sessions database. that's the whole vibe. it's the "delete" button for your session store, and you get to decide what that button does πŸ—‘οΈβœ¨

big rule: this function must return 0 on success. fr fr. zero means we ate, anything else means something went sideways 😭

and here's the lil detail that lowkey matters: the first argument to rem_func will be null unless gnutls_db_set_ptr() has been called. so if you're like "why is this pointer null" β€” that's why, bestie. call gnutls_db_set_ptr() and suddenly it's not null anymore 🫢


🌈 REPORTING BUGS 🌈

found a bug? don't suffer in silence, tell the gnutls people πŸ’Œ


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. (slay, that's the license, and it's very generous of them πŸ’–)


πŸ’« SEE ALSO πŸ’«

The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:

https://www.gnutls.org/manual/

and that's the page, bestie 🌸 it's from gnutls 3.8.13, so if you're out here on some other version, double check your vibes πŸ’… go forth and remove those sessions, main character πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from