Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/http_client.c

    ra72dc2b r3f808ca  
    3333
    3434static gboolean http_connected( gpointer data, int source, b_input_condition cond );
    35 static gboolean http_ssl_connected( gpointer data, int returncode, void *source, b_input_condition cond );
     35static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond );
    3636static gboolean http_incoming_data( gpointer data, int source, b_input_condition cond );
    3737static void http_free( struct http_request *req );
     
    4747        if( ssl )
    4848        {
    49                 req->ssl = ssl_connect( host, port, TRUE, http_ssl_connected, req );
     49                req->ssl = ssl_connect( host, port, http_ssl_connected, req );
    5050                if( req->ssl == NULL )
    5151                        error = 1;
     
    163163       
    164164error:
    165         if( req->status_string == NULL )
    166                 req->status_string = g_strdup( "Error while writing HTTP request" );
     165        req->status_string = g_strdup( "Error while writing HTTP request" );
    167166       
    168167        req->func( req );
     
    171170}
    172171
    173 static gboolean http_ssl_connected( gpointer data, int returncode, void *source, b_input_condition cond )
    174 {
    175         //The returncode is not used at the moment.
     172static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond )
     173{
    176174        struct http_request *req = data;
    177175       
    178176        if( source == NULL )
    179         {
    180                 if( returncode != 0 )
    181                 {
    182                         char *err = ssl_verify_strerror( returncode );
    183                         req->status_string = g_strdup_printf(
    184                                 "Certificate verification problem 0x%x: %s",
    185                                 returncode, err ? err : "Unknown" );
    186                         g_free( err );
    187                 }
    188177                return http_connected( data, -1, cond );
    189         }
    190178       
    191179        req->fd = ssl_getfd( source );
     
    451439                if( new_proto == PROTO_HTTPS )
    452440                {
    453                         req->ssl = ssl_connect( new_host, new_port, TRUE, http_ssl_connected, req );
     441                        req->ssl = ssl_connect( new_host, new_port, http_ssl_connected, req );
    454442                        if( req->ssl == NULL )
    455443                                error = 1;
Note: See TracChangeset for help on using the changeset viewer.