Changeset f56c491 for protocols/proxy.c


Ignore:
Timestamp:
2005-11-15T13:35:24Z (19 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
cc9079e
Parents:
abe53d3 (diff), b135438 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge new changes from pluginable and Wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/proxy.c

    rabe53d3 rf56c491  
    9797}
    9898
    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 
    12799static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data)
    128100{
     
    130102        GaimInputCondition gaim_cond = 0;
    131103
    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        
    158104        if (condition & GAIM_READ_COND)
    159105                gaim_cond |= GAIM_INPUT_READ;
Note: See TracChangeset for help on using the changeset viewer.