Changes in protocols/proxy.c [7b23afd:21d09ac]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/proxy.c
r7b23afd r21d09ac 50 50 #define GAIM_ERR_COND (G_IO_HUP | G_IO_ERR | G_IO_NVAL) 51 51 52 /*FIXME* 53 #ifndef _WIN32 54 if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { 55 closesocket(fd); 56 g_free(phb); 57 return -1; 58 } 59 fcntl(fd, F_SETFL, 0); 60 #endif*/ 61 52 62 char proxyhost[128] = ""; 53 63 int proxyport = 0; … … 97 107 } 98 108 99 #ifdef PROXYPROFILER100 struct proxyprofiler101 {102 GaimInputFunction function;103 gpointer data;104 105 int count;106 107 struct proxyprofiler *next;108 } *pp = NULL;109 110 void proxyprofiler_dump()111 {112 struct proxyprofiler *l;113 char s[128];114 FILE *fp;115 116 sprintf( s, "proxyprofiler.%d", (int) getpid() );117 fp = fopen( s, "w" );118 119 fprintf( fp, "%-18s %-18s %10s\n", "Function", "Data", "Count" );120 for( l = pp; l; l = l->next )121 fprintf( fp, "0x%-16x 0x%-16x %10d\n", (int) l->function, (int) l->data, l->count );122 123 fclose( fp );124 }125 #endif126 127 109 static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) 128 110 { … … 130 112 GaimInputCondition gaim_cond = 0; 131 113 132 #ifdef PROXYPROFILER133 struct proxyprofiler *l;134 135 for( l = pp; l; l = l->next )136 {137 if( closure->function == l->function && closure->data == l->data )138 break;139 }140 if( l )141 {142 l->count ++;143 }144 else145 {146 l = g_new0( struct proxyprofiler, 1 );147 l->function = closure->function;148 l->data = closure->data;149 l->count = 1;150 151 l->next = pp;152 pp = l;153 }154 #endif155 156 count_io_event(source, "proxy");157 158 114 if (condition & GAIM_READ_COND) 159 115 gaim_cond |= GAIM_INPUT_READ;
Note: See TracChangeset
for help on using the changeset viewer.