]> granicus.if.org Git - curl/commitdiff
transfer: avoid insane conversion of time_t
authorStefan Krause <Stefan.Krause@gmx.net>
Wed, 23 Feb 2011 18:58:43 +0000 (19:58 +0100)
committerKamil Dudka <kdudka@redhat.com>
Fri, 4 Mar 2011 20:17:08 +0000 (21:17 +0100)
lib/file.c
lib/transfer.c
lib/transfer.h

index a627a81298153028ff49d76ca346ea6a25417770..d4e941f7553e86172d20d9143a031a89f07420a7 100644 (file)
@@ -464,7 +464,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
   }
 
   if(fstated && !data->state.range && data->set.timecondition) {
-    if(!Curl_meets_timecondition(data, data->info.filetime)) {
+    if(!Curl_meets_timecondition(data, (time_t)data->info.filetime)) {
       *done = TRUE;
       return CURLE_OK;
     }
index f316000a12d1647f04dff824211ed6eb75db0aef..b3e6e993568ffd280892b5656660312a78f55e58 100644 (file)
@@ -359,7 +359,7 @@ static void read_rewind(struct connectdata *conn,
  * Check to see if CURLOPT_TIMECONDITION was met by comparing the time of the
  * remote document with the time provided by CURLOPT_TIMEVAL
  */
-bool Curl_meets_timecondition(struct SessionHandle *data, long timeofdoc)
+bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc)
 {
   if((timeofdoc == 0) || (data->set.timevalue == 0))
     return TRUE;
index c966cafb0fe0eb86449b3c17121c5619ae6f3f74..f60937cbfec3b652990b19aead822248e62b0a7f 100644 (file)
@@ -47,7 +47,7 @@ CURLcode Curl_readrewind(struct connectdata *conn);
 CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp);
 CURLcode Curl_reconnect_request(struct connectdata **connp);
 CURLcode Curl_retry_request(struct connectdata *conn, char **url);
-bool Curl_meets_timecondition(struct SessionHandle *data, long timeofdoc);
+bool Curl_meets_timecondition(struct SessionHandle *data, time_t timeofdoc);
 
 /* This sets up a forthcoming transfer */
 void