Changes in / [51a4ffb:b1bd100]


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • configure

    r51a4ffb rb1bd100  
    163163fi
    164164
     165GLIB=0
     166
    165167if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
    166168        cat<<EOF>>Makefile.settings
     
    169171EOF
    170172        echo '#define GLIB2' >> config.h
     173        GLIB=2
    171174elif type glib-config > /dev/null 2> /dev/null; then
    172175        cat<<EOF>>Makefile.settings
     
    175178EOF
    176179        echo '#define GLIB1' >> config.h
     180        GLIB=1
    177181else
    178182        echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)'
     
    180184fi
    181185
    182 if [ -r /usr/include/iconv.h ]; then
     186if [ GLIB = 1 -o -r /usr/include/iconv.h ]; then
    183187        :;
    184188elif [ -r /usr/local/include/iconv.h ]; then
  • protocols/nogaim.h

    r51a4ffb rb1bd100  
    5252#define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
    5353
    54 #define WEBSITE "http://www.bitlee.org/"
     54#define WEBSITE "http://www.bitlbee.org/"
    5555#define IM_FLAG_AWAY 0x0020
    5656#define OPT_CONN_HTML 0x00000001
  • protocols/ssl_sspi.c

    r51a4ffb rb1bd100  
    4848};
    4949
    50 static void ssl_connected( gpointer data, gint source, GaimInputCondition cond );
     50static void ssl_connected(gpointer, gint, GaimInputCondition);
    5151
    5252void sspi_global_init( void )
     
    6363{
    6464        struct scd *conn = g_new0( struct scd, 1 );
     65               
     66        conn->fd = proxy_connect( host, port, ssl_connected, conn );
     67        conn->func = func;
     68        conn->data = data;
     69        conn->inpa = -1;
     70       
     71        if( conn->fd < 0 )
     72        {
     73                g_free( conn );
     74                return( NULL );
     75        }
     76       
     77        if( !initialized )
     78        {
     79                sspi_global_init();
     80                initialized = TRUE;
     81                atexit( sspi_global_deinit );
     82        }
     83
     84        return conn;
     85}
     86
     87static void ssl_connected(gpointer data, gint fd, GaimInputCondition cond)
     88{
     89        struct scd *conn = data;
    6590        SCHANNEL_CRED ssl_cred;
    6691        TimeStamp timestamp;
     
    7297                ISC_REQ_MANUAL_CRED_VALIDATION;
    7398        ULONG a;
    74        
    75         conn->fd = proxy_connect( host, port, ssl_connected, conn );
    76         conn->func = func;
    77         conn->data = data;
    78         conn->inpa = -1;
    79        
    80         if( conn->fd < 0 )
    81         {
    82                 g_free( conn );
    83                 return( NULL );
    84         }
    85        
    86         if( !initialized )
    87         {
    88                 sspi_global_init();
    89                 initialized = TRUE;
    90                 atexit( sspi_global_deinit );
    91         }
    9299
    93100        memset(&ssl_cred, 0, sizeof(SCHANNEL_CRED));
     
    97104        SECURITY_STATUS st = AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &ssl_cred, NULL, NULL, &conn->cred, &timestamp);
    98105
    99         if (st != SEC_E_OK)
    100                 return NULL;
     106        if (st != SEC_E_OK) {
     107                conn->func( conn->data, NULL, cond );
     108                return;
     109       
    101110       
    102111        do {
    103112                /* initialize buffers */
    104113            ibuf[0].cbBuffer = size; ibuf[0].pvBuffer = buf;
    105             ibuf[1].cbBuffer = 0; ibuf[1].pvBuffer = NIL;
    106             obuf[0].cbBuffer = 0; obuf[0].pvBuffer = NIL;
     114            ibuf[1].cbBuffer = 0; ibuf[1].pvBuffer = NULL;
     115            obuf[0].cbBuffer = 0; obuf[0].pvBuffer = NULL;
    107116        ibuf[0].BufferType = obuf[0].BufferType = SECBUFFER_TOKEN;
    108117            ibuf[1].BufferType = SECBUFFER_EMPTY;
     
    127136
    128137                QueryContextAttributes(&conn->context, SECPKG_ATTR_STREAM_SIZES, &conn->sizes);
    129 
    130        
    131         return( conn );
     138        } while (1);
     139
     140        conn->func( conn->data, conn, cond );
    132141}
    133142
     
    233242        DeleteSecurityContext(&scd->context);
    234243
    235         FreeCredentialHandle(&scd->cred);
     244        FreeCredentialsHandle(&scd->cred);
    236245
    237246        closesocket( scd->fd );
  • util.c

    r51a4ffb rb1bd100  
    3939#include <glib.h>
    4040#include <time.h>
     41#ifdef GLIB2
     42#define iconv_t GIConv
     43#define iconv_open g_iconv_open
     44#define iconv_close g_iconv_close
     45#define iconv g_iconv
     46#else
    4147#include <iconv.h>
     48#endif
    4249
    4350void strip_linefeed(gchar *text)
Note: See TracChangeset for help on using the changeset viewer.