diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | bitlbee.c | 6 | ||||
-rw-r--r-- | bitlbee.h | 1 | ||||
-rw-r--r-- | commands.c | 8 | ||||
-rw-r--r-- | debug.c | 60 | ||||
-rw-r--r-- | debug.h | 33 | ||||
-rw-r--r-- | protocols/proxy.c | 2 |
7 files changed, 1 insertions, 111 deletions
@@ -9,7 +9,7 @@ -include Makefile.settings # Program variables -objects = account.o bitlbee.o commands.o conf.o crypting.o help.o ini.o irc.o log.o nick.o query.o set.o unix.o url.o user.o debug.o +objects = account.o bitlbee.o commands.o conf.o crypting.o help.o ini.o irc.o log.o nick.o query.o set.o unix.o url.o user.o subdirs = protocols # Expansion of variables @@ -40,8 +40,6 @@ gboolean bitlbee_io_new_client( GIOChannel *source, GIOCondition condition, gpoi int new_socket = accept( global.listen_socket, (struct sockaddr *) &conn_info, &size ); - count_io_event(source, "main"); - log_message( LOGLVL_INFO, "Creating new connection with fd %d.", new_socket ); irc_new( new_socket ); @@ -124,8 +122,6 @@ gboolean bitlbee_io_current_client_read( GIOChannel *source, GIOCondition condit char line[513]; int st; - count_io_event(source, "main"); - if( condition & G_IO_ERR || condition & G_IO_HUP ) { irc_free( irc ); @@ -181,8 +177,6 @@ gboolean bitlbee_io_current_client_write( GIOChannel *source, GIOCondition condi time_t newtime; #endif - count_io_event(source, "main"); - #ifdef FLOOD_SEND newtime = time( NULL ); if( ( newtime - irc->oldtime ) > FLOOD_SEND_INTERVAL ) @@ -106,7 +106,6 @@ extern char *CONF_FILE; #include "ini.h" #include "help.h" #include "query.h" -#include "debug.h" #include "sock.h" typedef struct global_t { @@ -51,7 +51,6 @@ command_t commands[] = { { "nick", 1, cmd_nick }, { "import_buddies", 1, cmd_import_buddies }, { "qlist", 0, cmd_qlist }, - { "dump", 0, cmd_dump }, { NULL } }; @@ -795,10 +794,3 @@ int cmd_import_buddies( irc_t *irc, char **cmd ) return( 0 ); } - -int cmd_dump( irc_t *irc, char **cmd ) { - write_io_activity(); - irc_usermsg(irc, "Wrote GIO activity log to disk."); - - return( 0 ); -} diff --git a/debug.c b/debug.c deleted file mode 100644 index 12f1ea29..00000000 --- a/debug.c +++ /dev/null @@ -1,60 +0,0 @@ - /********************************************************************\ - * BitlBee -- An IRC to other IM-networks gateway * - * * - * Copyright 2002-2004 Wilmer van der Gaast and others * - \********************************************************************/ - -/* Random debug stuff */ - -/* - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL; - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA -*/ - -#define BITLBEE_CORE -#include "bitlbee.h" - -GHashTable *iocounter=NULL; -FILE *activity_output; - -static void for_each_node(gpointer key, gpointer value, gpointer user_data); - -void count_io_event(GIOChannel *source, char *section) { - long int *newcounter; - - if(iocounter==NULL) { - iocounter=g_hash_table_new(NULL, NULL); - } - - if(g_hash_table_lookup(iocounter, section)==NULL) { - newcounter=g_new0(long int, 1); - g_hash_table_insert(iocounter, section, newcounter); - } else { - newcounter=g_hash_table_lookup(iocounter, section); - (*newcounter)++; - } -} - -void write_io_activity(void) { - activity_output=fopen("ioactivity.log", "a"); - fprintf(activity_output, "Amount of GIO events raised for each section of the code:\n"); - g_hash_table_foreach(iocounter, &for_each_node, NULL); - fprintf(activity_output, "End of list\n"); - fclose(activity_output); -} - -static void for_each_node(gpointer key, gpointer value, gpointer user_data) { - fprintf(activity_output, "%s %ld\n", (char *)key, (*(long int *)value)); -} diff --git a/debug.h b/debug.h deleted file mode 100644 index e17b40cf..00000000 --- a/debug.h +++ /dev/null @@ -1,33 +0,0 @@ - /********************************************************************\ - * BitlBee -- An IRC to other IM-networks gateway * - * * - * Copyright 2002-2004 Wilmer van der Gaast and others * - \********************************************************************/ - -/* Random debug stuff */ - -/* - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License with - the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL; - if not, write to the Free Software Foundation, Inc., 59 Temple Place, - Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef _DEBUG_H - -void count_io_event(GIOChannel *source, char *section); -void write_io_activity(void); - -#define _DEBUG_H -#endif - diff --git a/protocols/proxy.c b/protocols/proxy.c index b0196e12..cdfd8edf 100644 --- a/protocols/proxy.c +++ b/protocols/proxy.c @@ -163,8 +163,6 @@ static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpoin } #endif - count_io_event(source, "proxy"); - if (condition & GAIM_READ_COND) gaim_cond |= GAIM_INPUT_READ; if (condition & GAIM_WRITE_COND) |