mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 05:06:21 +00:00
Introduce our own shutdown callback mechanism.
Instead of adding stuff to `_shutdown()`, we can now register a shutdown routine from the respective `init()` function of our modules. This also has the advantage, that we're sure they're called in reverse order from how the initialization happened. I didn't simply use `atexit()` because POSIX says that the number of possible callbacks is limited (min 32) and I was not sure whether we will maybe extend this number at one point. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -45,7 +45,7 @@ typedef enum {
|
||||
PROF_OUT_LOG
|
||||
} chat_log_direction_t;
|
||||
|
||||
void chat_log_init(void);
|
||||
void chatlog_init(void);
|
||||
|
||||
void chat_log_msg_out(const char* const barejid, const char* const msg, const char* resource);
|
||||
void chat_log_otr_msg_out(const char* const barejid, const char* const msg, const char* resource);
|
||||
@@ -57,8 +57,6 @@ void chat_log_otr_msg_in(ProfMessage* message);
|
||||
void chat_log_pgp_msg_in(ProfMessage* message);
|
||||
void chat_log_omemo_msg_in(ProfMessage* message);
|
||||
|
||||
void chat_log_close(void);
|
||||
|
||||
void groupchat_log_init(void);
|
||||
|
||||
void groupchat_log_msg_out(const gchar* const room, const gchar* const msg);
|
||||
|
||||
Reference in New Issue
Block a user