summaryrefslogtreecommitdiff
path: root/lib/share.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-09 08:23:55 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-09 08:23:55 +0000
commit90037b85d1a6c46979729d0735eef094516dc31f (patch)
treec47c68d433b7c8af0f6ad63e2979ccfd6354539c /lib/share.c
parent6ec145d4b451d51310f887ef01bb40b48004d131 (diff)
downloadcurl-90037b85d1a6c46979729d0735eef094516dc31f.tar.gz
Alexander Krasnostavsky's fix to make libcurl build fine with configure
--disable-http, which thus builds a libcurl without HTTP support.
Diffstat (limited to 'lib/share.c')
-rw-r--r--lib/share.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/share.c b/lib/share.c
index d1292c4ae..ad68496f6 100644
--- a/lib/share.c
+++ b/lib/share.c
@@ -76,7 +76,8 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
return CURLSHE_NOMEM;
}
break;
-
+
+#ifndef CURL_DISABLE_HTTP
case CURL_LOCK_DATA_COOKIE:
if (!share->cookies) {
share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE );
@@ -84,6 +85,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
return CURLSHE_NOMEM;
}
break;
+#endif /* CURL_DISABLE_HTTP */
case CURL_LOCK_DATA_SSL_SESSION: /* not supported (yet) */
case CURL_LOCK_DATA_CONNECT: /* not supported (yet) */
@@ -106,12 +108,14 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
}
break;
+#ifndef CURL_DISABLE_HTTP
case CURL_LOCK_DATA_COOKIE:
if (share->cookies) {
Curl_cookie_cleanup(share->cookies);
share->cookies = NULL;
}
break;
+#endif /* CURL_DISABLE_HTTP */
case CURL_LOCK_DATA_SSL_SESSION:
break;
@@ -165,8 +169,10 @@ curl_share_cleanup(CURLSH *sh)
if(share->hostcache)
Curl_hash_destroy(share->hostcache);
+#ifndef CURL_DISABLE_HTTP
if(share->cookies)
Curl_cookie_cleanup(share->cookies);
+#endif /* CURL_DISABLE_HTTP */
share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata);
free (share);