Changes in / [8a9afe4:dd9a51b]


Ignore:
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • protocols/Makefile

    r8a9afe4 rdd9a51b  
    1010
    1111# [SH] Program variables
    12 objects = http_client.o md5.o nogaim.o proxy.o sha.o $(SSL_CLIENT) util.o
     12objects = md5.o nogaim.o proxy.o sha.o util.o $(SSL_CLIENT)
    1313
    1414# [SH] The next two lines should contain the directory name (in $(subdirs))
  • protocols/proxy.c

    r8a9afe4 rdd9a51b  
    106106        if (condition & GAIM_WRITE_COND)
    107107                gaim_cond |= GAIM_INPUT_WRITE;
     108//      if (condition & GAIM_ERR_COND)
     109//              fprintf( stderr, "ERROR! fd=%d\n", g_io_channel_unix_get_fd( source ) );
    108110
    109111        closure->function(closure->data, g_io_channel_unix_get_fd(source), gaim_cond);
  • protocols/ssl_bogus.c

    r8a9afe4 rdd9a51b  
    2828int ssl_errno;
    2929
    30 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )
     30void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )
    3131{
    3232        return( NULL );
  • protocols/ssl_client.h

    r8a9afe4 rdd9a51b  
    3333extern int ssl_errno;
    3434
    35 typedef void (*ssl_input_function)(gpointer, void*, GaimInputCondition);
     35typedef void (*SslInputFunction)(gpointer, void*, GaimInputCondition);
    3636
    37 G_MODULE_EXPORT void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data );
     37G_MODULE_EXPORT void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data );
    3838G_MODULE_EXPORT int ssl_read( void *conn, char *buf, int len );
    3939G_MODULE_EXPORT int ssl_write( void *conn, const char *buf, int len );
    4040G_MODULE_EXPORT void ssl_disconnect( void *conn_ );
    4141G_MODULE_EXPORT int ssl_getfd( void *conn );
    42 G_MODULE_EXPORT GaimInputCondition ssl_getdirection( void *conn );
  • protocols/ssl_gnutls.c

    r8a9afe4 rdd9a51b  
    3838struct scd
    3939{
    40         ssl_input_function func;
     40        SslInputFunction func;
    4141        gpointer data;
    4242        int fd;
     
    5151
    5252
    53 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )
     53void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )
    5454{
    5555        struct scd *conn = g_new0( struct scd, 1 );
     
    117117                if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED )
    118118                {
    119                         conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ),
     119                        conn->inpa = gaim_input_add( conn->fd,
     120                                                     gnutls_record_get_direction( conn->session ) ?
     121                                                         GAIM_INPUT_WRITE : GAIM_INPUT_READ,
    120122                                                     ssl_handshake, data );
    121123                }
     
    143145int ssl_read( void *conn, char *buf, int len )
    144146{
    145         int st;
    146        
    147147        if( !((struct scd*)conn)->established )
    148148        {
     
    151151        }
    152152       
    153         st = gnutls_record_recv( ((struct scd*)conn)->session, buf, len );
     153        return( gnutls_record_recv( ((struct scd*)conn)->session, buf, len ) );
    154154       
    155         ssl_errno = SSL_OK;
    156         if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED )
    157                 ssl_errno = SSL_AGAIN;
    158        
    159         return st;
    160155}
    161156
    162157int ssl_write( void *conn, const char *buf, int len )
    163158{
    164         int st;
    165        
    166159        if( !((struct scd*)conn)->established )
    167160        {
     
    170163        }
    171164       
    172         st = gnutls_record_send( ((struct scd*)conn)->session, buf, len );
    173        
    174         ssl_errno = SSL_OK;
    175         if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED )
    176                 ssl_errno = SSL_AGAIN;
    177        
    178         return st;
     165        return( gnutls_record_send( ((struct scd*)conn)->session, buf, len ) );
    179166}
    180167
     
    197184        return( ((struct scd*)conn)->fd );
    198185}
    199 
    200 GaimInputCondition ssl_getdirection( void *conn )
    201 {
    202         return( gnutls_record_get_direction( ((struct scd*)conn)->session ) ?
    203                 GAIM_INPUT_WRITE : GAIM_INPUT_READ );
    204 }
  • protocols/ssl_nss.c

    r8a9afe4 rdd9a51b  
    4545struct scd
    4646{
    47         ssl_input_function func;
     47        SslInputFunction func;
    4848        gpointer data;
    4949        int fd;
     
    9191
    9292
    93 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )
     93void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )
    9494{
    9595        struct scd *conn = g_new0( struct scd, 1 );
  • protocols/ssl_openssl.c

    r8a9afe4 rdd9a51b  
    4141struct scd
    4242{
    43         ssl_input_function func;
     43        SslInputFunction func;
    4444        gpointer data;
    4545        int fd;
     
    5454
    5555
    56 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )
     56void *ssl_connect( char *host, int port, SslInputFunction func, gpointer data )
    5757{
    5858        struct scd *conn = g_new0( struct scd, 1 );
  • sock.h

    r8a9afe4 rdd9a51b  
    1 #include <errno.h>
    2 #include <fcntl.h>
    3 
    41#ifndef _WIN32
    52#include <unistd.h>
Note: See TracChangeset for help on using the changeset viewer.