Ignore:
Timestamp:
2006-05-13T14:20:32Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
782d988
Parents:
2b7d2d1
Message:

OpenSSL support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/ssl_openssl.c

    r2b7d2d1 r309cb9e  
    5252};
    5353
    54 static void ssl_connected( gpointer data, gint source, b_input_condition cond );
    55 
     54static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond );
    5655
    5756
     
    9594}
    9695
    97 static void ssl_handshake( gpointer data, gint source, b_input_condition cond );
    98 
    99 static void ssl_connected( gpointer data, gint source, b_input_condition cond )
     96static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond );
     97
     98static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond )
    10099{
    101100        struct scd *conn = data;
     
    104103                return ssl_handshake( data, -1, cond );
    105104       
    106         /* Make it non-blocking at least during the handshake... */
     105        /* We can do at least the handshake with non-blocking I/O */
    107106        sock_make_nonblocking( conn->fd );
    108107        SSL_set_fd( conn->ssl, conn->fd );
     
    111110}       
    112111
    113 static void ssl_handshake( gpointer data, gint source, b_input_condition cond )
     112static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond )
    114113{
    115114        struct scd *conn = data;
     
    118117        if( conn->inpa != -1 )
    119118        {
    120                 gaim_input_remove( conn->inpa );
     119                b_event_remove( conn->inpa );
    121120                conn->inpa = -1;
    122121        }
     
    128127                        goto ssl_connected_failure;
    129128               
    130                 conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ), ssl_handshake, data );
    131                 return;
     129                conn->inpa = b_input_add( conn->fd, ssl_getdirection( conn ), ssl_handshake, data );
     130                return FALSE;
    132131        }
    133132       
     
    135134        sock_make_blocking( conn->fd );         /* For now... */
    136135        conn->func( conn->data, conn, cond );
    137         return;
     136        return FALSE;
    138137       
    139138ssl_connected_failure:
     
    151150        if( source >= 0 ) closesocket( source );
    152151        g_free( conn );
     152       
     153        return FALSE;
    153154}
    154155
     
    204205       
    205206        if( conn->inpa != -1 )
    206                 gaim_input_remove( conn->inpa );
     207                b_event_remove( conn->inpa );
    207208       
    208209        if( conn->established )
Note: See TracChangeset for help on using the changeset viewer.