Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/http_client.c

    r516a9c6 re046390  
    3535static 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 );
    37 static void http_free( struct http_request *req );
    38 
    39 
    40 struct http_request *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data )
     37
     38
     39void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data )
    4140{
    4241        struct http_request *req;
     
    6867        req->request = g_strdup( request );
    6968        req->request_length = strlen( request );
    70         req->redir_ttl = 3;
    7169       
    7270        return( req );
    7371}
    7472
    75 struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data )
     73void *http_dorequest_url( char *url_string, http_input_function func, gpointer data )
    7674{
    7775        url_t *url = g_new0( url_t, 1 );
     
    151149        if( req->bytes_written < req->request_length )
    152150                req->inpa = b_input_add( source,
    153                                          req->ssl ? ssl_getdirection( req->ssl ) : GAIM_INPUT_WRITE,
     151                                         req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_WRITE,
    154152                                         http_connected, req );
    155153        else
    156                 req->inpa = b_input_add( source, GAIM_INPUT_READ, http_incoming_data, req );
     154                req->inpa = b_input_add( source, B_EV_IO_READ, http_incoming_data, req );
    157155       
    158156        return FALSE;
     
    236234        /* There will be more! */
    237235        req->inpa = b_input_add( req->fd,
    238                                  req->ssl ? ssl_getdirection( req->ssl ) : GAIM_INPUT_READ,
     236                                 req->ssl ? ssl_getdirection( req->ssl ) : B_EV_IO_READ,
    239237                                 http_incoming_data, req );
    240238       
     
    313311        }
    314312       
    315         if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0 )
     313        if( req->status_code == 301 || req->status_code == 302 )
    316314        {
    317315                char *loc, *new_request, *new_host;
     
    447445}
    448446
    449 static void http_free( struct http_request *req )
     447void http_free( struct http_request *req )
    450448{
    451449        g_free( req->request );
Note: See TracChangeset for help on using the changeset viewer.