Changeset c595308 for root_commands.c


Ignore:
Timestamp:
2008-02-11T21:20:35Z (16 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
8bd697c
Parents:
d6fdf44
Message:
  • use a recursive otr_mutex
  • implement 'otr forget fingerprint' and 'otr forget context' commands
File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rd6fdf44 rc595308  
    8686                return;
    8787       
    88         if(!g_mutex_trylock(irc->otr_mutex)) {
     88        if(!g_static_rec_mutex_trylock(&irc->otr_mutex)) {
    8989                irc_usermsg(irc, "keygen in progress, bitlbee comatose - please wait");
    9090                return;
     
    9797                        {
    9898                                irc_usermsg( irc, "Not enough parameters given (need %d)", commands[i].required_parameters );
    99                                 g_mutex_unlock(irc->otr_mutex);
     99                                g_static_rec_mutex_unlock(&irc->otr_mutex);
    100100                                return;
    101101                        }
    102102                        commands[i].execute( irc, cmd );
    103                         g_mutex_unlock(irc->otr_mutex);
     103                        g_static_rec_mutex_unlock(&irc->otr_mutex);
    104104                        return;
    105105                }
    106106       
    107107        irc_usermsg( irc, "Unknown command: %s. Please use \x02help commands\x02 to get a list of available commands.", cmd[0] );
    108         g_mutex_unlock(irc->otr_mutex);
     108        g_static_rec_mutex_unlock(&irc->otr_mutex);
    109109}
    110110
Note: See TracChangeset for help on using the changeset viewer.