File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ static int ipc_master_cmd_die( irc_t *data, char **cmd )
5858 return 1 ;
5959}
6060
61- static int ipc_master_cmd_rehash ( irc_t * data , char * * cmd )
61+ int ipc_master_cmd_rehash ( irc_t * data , char * * cmd )
6262{
6363 runmode_t oldmode ;
6464
Original file line number Diff line number Diff line change 2626#define BITLBEE_CORE
2727#include "bitlbee.h"
2828
29+
2930struct bitlbee_child
3031{
3132 pid_t pid ;
@@ -37,6 +38,7 @@ struct bitlbee_child
3738 char * realname ;
3839};
3940
41+
4042void ipc_master_read ( gpointer data , gint source , GaimInputCondition cond );
4143void ipc_child_read ( gpointer data , gint source , GaimInputCondition cond );
4244
@@ -48,4 +50,8 @@ void ipc_to_master_str( char *format, ... );
4850void ipc_to_children ( char * * cmd );
4951void ipc_to_children_str ( char * format , ... );
5052
53+ /* We need this function in inetd mode, so let's just make it non-static. */
54+ int ipc_master_cmd_rehash ( irc_t * data , char * * cmd );
55+
56+
5157extern GSList * child_list ;
Original file line number Diff line number Diff line change @@ -579,7 +579,10 @@ static int irc_cmd_completions( irc_t *irc, char **cmd )
579579
580580static int irc_cmd_rehash ( irc_t * irc , char * * cmd )
581581{
582- ipc_to_master ( cmd );
582+ if ( global .conf -> runmode == RUNMODE_INETD )
583+ ipc_master_cmd_rehash ( NULL , NULL );
584+ else
585+ ipc_to_master ( cmd );
583586
584587 irc_reply ( irc , 382 , "%s :Rehashing" , CONF_FILE );
585588
@@ -655,6 +658,8 @@ int irc_exec( irc_t *irc, char *cmd[] )
655658 }
656659
657660 if ( irc_commands [i ].flags & IRC_CMD_TO_MASTER )
661+ /* IPC doesn't make sense in inetd mode,
662+ but the function will catch that. */
658663 ipc_to_master ( cmd );
659664 else
660665 return irc_commands [i ].execute ( irc , cmd );
You can’t perform that action at this time.
0 commit comments