show a verbose warning message in case cookie-saving fails, after
authorDaniel Stenberg <daniel@haxx.se>
Fri, 11 Apr 2003 07:39:16 +0000 (07:39 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 11 Apr 2003 07:39:16 +0000 (07:39 +0000)
Ralph Mitchell's notification.

lib/url.c

index 9f48db7fcfcec4b68164df1dadfb45f4dd2c437c..5cb8fe4df3e6a5965fe42cf4b0123c5d509243c0 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -210,9 +210,11 @@ CURLcode Curl_close(struct SessionHandle *data)
     free(data->state.headerbuff);
 
 #ifndef CURL_DISABLE_HTTP
-  if(data->set.cookiejar)
+  if(data->set.cookiejar) {
     /* we have a "destination" for all the cookies to get dumped to */
-    Curl_cookie_output(data->cookies, data->set.cookiejar);
+    if(Curl_cookie_output(data->cookies, data->set.cookiejar))
+      infof(data, "WARNING: failed to save cookies in given jar\n");
+  }
 
   Curl_cookie_cleanup(data->cookies);
 #endif