cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL_shutdown crashes

From: Guenter <lists_at_gknw.net>
Date: Tue, 29 Sep 2009 21:47:53 +0200

Hi,
1.) you have highjacked another thread which we do not tolerate here.
2.) your question doesnt belong here - please look for a C crash course,
and after finished that then read our wonderful API docu; if you have
then still questions then open here a *NEW* thread with a proper subject!
Recommendation:
http://en.wikipedia.org/wiki/The_C_Programming_Language_(book)

Thanks, Gün.

PS schrieb:
> Im trying to use libcurl in my C code.
> I have low level experience in C, but I try to use it and practice it
> with curl lib and without. Ok its lyrics.
>
>
> I have simple code with libcurl:
>
> #include <curl/curl.h>
>
> int main(void)
> {
> CURL *curl;
> CURLcode res;
> char errbuf[CURL_ERROR_SIZE],result;
>
>
> curl = curl_easy_init();
> if(curl) {
> curl_easy_setopt(curl, CURLOPT_URL, 'server');
> curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errbuf);
> curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
> res = curl_easy_perform(curl);
> if(res != 0){
> printf("%s\n", errbuf);
> } else {
> curl_easy_getinfo(curl,CURLINFO_CONTENT_TYPE,&result);
> printf("%c\n", result);
> }
> /* always cleanup */
> curl_easy_cleanup(curl);
> }
> return 0;
> }
>
> printf("%c\n", result); the string return abra-kadabra
> What's wrong ? I try tu use %s and nothing true again.
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-09-29