Changeset 823de9d for ipc.c


Ignore:
Timestamp:
2009-03-12T19:10:06Z (16 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
Branches:
master
Children:
673a54c
Parents:
9b55485
Message:

commit updates by ashish shukla <wahjava@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipc.c

    r9b55485 r823de9d  
    3333
    3434GSList *child_list = NULL;
     35static char *statefile = NULL;
    3536
    3637static void ipc_master_cmd_client( irc_t *data, char **cmd )
     
    6263}
    6364
    64 static void ipc_master_cmd_deaf( irc_t *data, char **cmd )
    65 {
    66         if( global.conf->runmode == RUNMODE_DAEMON )
    67         {
    68                 b_event_remove( global.listen_watch_source_id );
    69                 close( global.listen_socket );
    70                
    71                 global.listen_socket = global.listen_watch_source_id = -1;
    72        
    73                 ipc_to_children_str( "OPERMSG :Closed listening socket, waiting "
    74                                      "for all users to disconnect." );
    75         }
    76         else
    77         {
    78                 ipc_to_children_str( "OPERMSG :The DEAF command only works in "
    79                                      "normal daemon mode. Try DIE instead." );
    80         }
    81 }
    82 
    8365void ipc_master_cmd_rehash( irc_t *data, char **cmd )
    8466{
     
    11698        { "hello",      0, ipc_master_cmd_client,     0 },
    11799        { "die",        0, ipc_master_cmd_die,        0 },
    118         { "deaf",       0, ipc_master_cmd_deaf,       0 },
    119100        { "wallops",    1, NULL,                      IPC_CMD_TO_CHILDREN },
    120101        { "wall",       1, NULL,                      IPC_CMD_TO_CHILDREN },
     
    460441}
    461442
    462 #ifndef _WIN32
    463443char *ipc_master_save_state()
    464444{
     
    501481}
    502482
     483void ipc_master_set_statefile( char *fn )
     484{
     485        statefile = g_strdup( fn );
     486}
     487
    503488
    504489static gboolean new_ipc_client( gpointer data, gint serversock, b_input_condition cond )
     
    521506}
    522507
     508#ifndef _WIN32
    523509int ipc_master_listen_socket()
    524510{
     
    557543}
    558544#else
    559 int ipc_master_listen_socket()
    560 {
    561545        /* FIXME: Open named pipe \\.\BITLBEE */
    562         return 0;
    563 }
    564546#endif
    565547
    566 int ipc_master_load_state( char *statefile )
     548int ipc_master_load_state()
    567549{
    568550        struct bitlbee_child *child;
     
    572554        if( statefile == NULL )
    573555                return 0;
    574        
    575556        fp = fopen( statefile, "r" );
    576557        unlink( statefile );    /* Why do it later? :-) */
Note: See TracChangeset for help on using the changeset viewer.