Changes in protocols/proxy.c [21d09ac:7b23afd]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/proxy.c
r21d09ac r7b23afd 50 50 #define GAIM_ERR_COND (G_IO_HUP | G_IO_ERR | G_IO_NVAL) 51 51 52 /*FIXME*53 #ifndef _WIN3254 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 62 52 char proxyhost[128] = ""; 63 53 int proxyport = 0; … … 107 97 } 108 98 99 #ifdef PROXYPROFILER 100 struct proxyprofiler 101 { 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 #endif 126 109 127 static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) 110 128 { … … 112 130 GaimInputCondition gaim_cond = 0; 113 131 132 #ifdef PROXYPROFILER 133 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 else 145 { 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 #endif 155 156 count_io_event(source, "proxy"); 157 114 158 if (condition & GAIM_READ_COND) 115 159 gaim_cond |= GAIM_INPUT_READ;
Note: See TracChangeset
for help on using the changeset viewer.