Changes in lib/http_client.c [516a9c6:e046390]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
r516a9c6 re046390 35 35 static gboolean http_ssl_connected( gpointer data, void *source, b_input_condition cond ); 36 36 static 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 39 void *http_dorequest( char *host, int port, int ssl, char *request, http_input_function func, gpointer data ) 41 40 { 42 41 struct http_request *req; … … 68 67 req->request = g_strdup( request ); 69 68 req->request_length = strlen( request ); 70 req->redir_ttl = 3;71 69 72 70 return( req ); 73 71 } 74 72 75 struct http_request*http_dorequest_url( char *url_string, http_input_function func, gpointer data )73 void *http_dorequest_url( char *url_string, http_input_function func, gpointer data ) 76 74 { 77 75 url_t *url = g_new0( url_t, 1 ); … … 151 149 if( req->bytes_written < req->request_length ) 152 150 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, 154 152 http_connected, req ); 155 153 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 ); 157 155 158 156 return FALSE; … … 236 234 /* There will be more! */ 237 235 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, 239 237 http_incoming_data, req ); 240 238 … … 313 311 } 314 312 315 if( ( req->status_code == 301 || req->status_code == 302 ) && req->redir_ttl-- > 0)313 if( req->status_code == 301 || req->status_code == 302 ) 316 314 { 317 315 char *loc, *new_request, *new_host; … … 447 445 } 448 446 449 staticvoid http_free( struct http_request *req )447 void http_free( struct http_request *req ) 450 448 { 451 449 g_free( req->request );
Note: See TracChangeset
for help on using the changeset viewer.