Changeset b72caac for protocols/msn/ns.c


Ignore:
Timestamp:
2006-06-21T16:34:33Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
59f5c42a
Parents:
3af70b0 (diff), df417ca (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:

Merging libevent branch: Events can now be handles by both glib and libevent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    r3af70b0 rb72caac  
    3030#include "md5.h"
    3131
    32 static void msn_ns_callback( gpointer data, gint source, GaimInputCondition cond );
     32static gboolean msn_ns_callback( gpointer data, gint source, b_input_condition cond );
    3333static int msn_ns_command( gpointer data, char **cmd, int num_parts );
    3434static int msn_ns_message( gpointer data, char *msg, int msglen, char **cmd, int num_parts );
     
    3636static void msn_auth_got_passport_id( struct passport_reply *rep );
    3737
    38 void msn_ns_connected( gpointer data, gint source, GaimInputCondition cond )
     38gboolean msn_ns_connected( gpointer data, gint source, b_input_condition cond )
    3939{
    4040        struct gaim_connection *gc = data;
     
    4343       
    4444        if( !g_slist_find( msn_connections, gc ) )
    45                 return;
     45                return FALSE;
    4646       
    4747        if( source == -1 )
     
    4949                hide_login_progress( gc, "Could not connect to server" );
    5050                signoff( gc );
    51                 return;
     51                return FALSE;
    5252        }
    5353       
     
    7575        if( msn_write( gc, s, strlen( s ) ) )
    7676        {
    77                 gc->inpa = gaim_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, gc );
     77                gc->inpa = b_input_add( md->fd, GAIM_INPUT_READ, msn_ns_callback, gc );
    7878                set_login_progress( gc, 1, "Connected to server, waiting for reply" );
    7979        }
     80       
     81        return FALSE;
    8082}
    8183
    82 void msn_ns_callback( gpointer data, gint source, GaimInputCondition cond )
     84static gboolean msn_ns_callback( gpointer data, gint source, b_input_condition cond )
    8385{
    8486        struct gaim_connection *gc = data;
     
    8991                hide_login_progress( gc, "Error while reading from server" );
    9092                signoff( gc );
    91         }
     93               
     94                return FALSE;
     95        }
     96        else
     97                return TRUE;
    9298}
    9399
     
    130136                if( num_parts == 6 && strcmp( cmd[2], "NS" ) == 0 )
    131137                {
    132                         gaim_input_remove( gc->inpa );
     138                        b_event_remove( gc->inpa );
    133139                        gc->inpa = 0;
    134140                        closesocket( md->fd );
Note: See TracChangeset for help on using the changeset viewer.