Loading lib/url.c +62 −57 Original line number Diff line number Diff line Loading @@ -206,7 +206,10 @@ CURLcode Curl_open(struct SessionHandle **curl) /* Very simple start-up: alloc the struct, init it with zeroes and return */ data = (struct SessionHandle *)malloc(sizeof(struct SessionHandle)); if(data) { if(!data) /* this is a very serious error */ return CURLE_OUT_OF_MEMORY; memset(data, 0, sizeof(struct SessionHandle)); /* We do some initial setup here, all those fields that can't be just 0 */ Loading Loading @@ -261,7 +264,7 @@ CURLcode Curl_open(struct SessionHandle **curl) *curl = data; /************************************************************* * Set signal handler * Set signal handler to catch SIGALRM *************************************************************/ #ifdef HAVE_SIGACTION sigaction(SIGALRM, NULL, &sigact); Loading @@ -275,17 +278,19 @@ CURLcode Curl_open(struct SessionHandle **curl) /* no sigaction(), revert to the much lamer signal() */ #ifdef HAVE_SIGNAL signal(SIGALRM, alarmfunc); #endif #endif /************************************************************* * Tell signal handler to ignore SIGPIPE *************************************************************/ #if defined(HAVE_SIGNAL) && defined(SIGPIPE) (void) signal(SIGPIPE, SIG_IGN); #endif return CURLE_OK; } /* this is a very serious error */ return CURLE_OUT_OF_MEMORY; } CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) { va_list param; Loading Loading
lib/url.c +62 −57 Original line number Diff line number Diff line Loading @@ -206,7 +206,10 @@ CURLcode Curl_open(struct SessionHandle **curl) /* Very simple start-up: alloc the struct, init it with zeroes and return */ data = (struct SessionHandle *)malloc(sizeof(struct SessionHandle)); if(data) { if(!data) /* this is a very serious error */ return CURLE_OUT_OF_MEMORY; memset(data, 0, sizeof(struct SessionHandle)); /* We do some initial setup here, all those fields that can't be just 0 */ Loading Loading @@ -261,7 +264,7 @@ CURLcode Curl_open(struct SessionHandle **curl) *curl = data; /************************************************************* * Set signal handler * Set signal handler to catch SIGALRM *************************************************************/ #ifdef HAVE_SIGACTION sigaction(SIGALRM, NULL, &sigact); Loading @@ -275,17 +278,19 @@ CURLcode Curl_open(struct SessionHandle **curl) /* no sigaction(), revert to the much lamer signal() */ #ifdef HAVE_SIGNAL signal(SIGALRM, alarmfunc); #endif #endif /************************************************************* * Tell signal handler to ignore SIGPIPE *************************************************************/ #if defined(HAVE_SIGNAL) && defined(SIGPIPE) (void) signal(SIGPIPE, SIG_IGN); #endif return CURLE_OK; } /* this is a very serious error */ return CURLE_OUT_OF_MEMORY; } CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) { va_list param; Loading