aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-11 22:20:35 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-11 22:20:35 +0100
commitc59530844d25ae814141cf56f0fa810968e8df55 (patch)
treef1f76ff93585197f77f255c27cf6434adc23138d /root_commands.c
parentd6fdf44c54ac2aecfd0c94a2d56be04e44a51eb3 (diff)
- use a recursive otr_mutex
- implement 'otr forget fingerprint' and 'otr forget context' commands
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/root_commands.c b/root_commands.c
index 7352b638..03b579a1 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -85,7 +85,7 @@ void root_command( irc_t *irc, char *cmd[] )
if( !cmd[0] )
return;
- if(!g_mutex_trylock(irc->otr_mutex)) {
+ if(!g_static_rec_mutex_trylock(&irc->otr_mutex)) {
irc_usermsg(irc, "keygen in progress, bitlbee comatose - please wait");
return;
}
@@ -96,16 +96,16 @@ void root_command( irc_t *irc, char *cmd[] )
if( !cmd[commands[i].required_parameters] )
{
irc_usermsg( irc, "Not enough parameters given (need %d)", commands[i].required_parameters );
- g_mutex_unlock(irc->otr_mutex);
+ g_static_rec_mutex_unlock(&irc->otr_mutex);
return;
}
commands[i].execute( irc, cmd );
- g_mutex_unlock(irc->otr_mutex);
+ g_static_rec_mutex_unlock(&irc->otr_mutex);
return;
}
irc_usermsg( irc, "Unknown command: %s. Please use \x02help commands\x02 to get a list of available commands.", cmd[0] );
- g_mutex_unlock(irc->otr_mutex);
+ g_static_rec_mutex_unlock(&irc->otr_mutex);
}
static void cmd_help( irc_t *irc, char **cmd )