Changeset 522a00f for irc.c


Ignore:
Timestamp:
2008-02-15T09:27:26Z (17 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
27db433
Parents:
6c91e6e
Message:

remove thread-based keygen
replace it with a process-based stub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r6c91e6e r522a00f  
    2828#include "crypting.h"
    2929#include "ipc.h"
     30#include <sys/types.h>
     31#include <sys/wait.h>
    3032
    3133static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond );
     
    133135
    134136        irc->otr_us = otrl_userstate_create();
    135         g_static_rec_mutex_init(&irc->otr_mutex);
     137        irc->otr_keygen = 0;
     138        irc->otr_ntodo = 0;
    136139       
    137140        return( irc );
     
    286289       
    287290        otrl_userstate_free(irc->otr_us);
    288         g_static_rec_mutex_free(&irc->otr_mutex);
     291        if(irc->otr_keygen) {
     292                kill(irc->otr_keygen, SIGTERM);
     293                waitpid(irc->otr_keygen, NULL, 0);
     294                /* TODO: remove stale keygen tempfiles */
     295        }
    289296       
    290297        g_free(irc);
Note: See TracChangeset for help on using the changeset viewer.