From 522a00f1b1163cedf15a86329c0097601eb7940b Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Fri, 15 Feb 2008 10:27:26 +0100 Subject: remove thread-based keygen replace it with a process-based stub --- irc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index b7046e59..a2bcfc59 100644 --- a/irc.c +++ b/irc.c @@ -27,6 +27,8 @@ #include "bitlbee.h" #include "crypting.h" #include "ipc.h" +#include +#include static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond ); @@ -132,7 +134,8 @@ irc_t *irc_new( int fd ) conf_loaddefaults( irc ); irc->otr_us = otrl_userstate_create(); - g_static_rec_mutex_init(&irc->otr_mutex); + irc->otr_keygen = 0; + irc->otr_ntodo = 0; return( irc ); } @@ -285,7 +288,11 @@ void irc_free(irc_t * irc) } otrl_userstate_free(irc->otr_us); - g_static_rec_mutex_free(&irc->otr_mutex); + if(irc->otr_keygen) { + kill(irc->otr_keygen, SIGTERM); + waitpid(irc->otr_keygen, NULL, 0); + /* TODO: remove stale keygen tempfiles */ + } g_free(irc); -- cgit v1.2.3