~ubuntu-branches/ubuntu/saucy/curl/saucy-201307251546

« back to all changes in this revision

Viewing changes to lib/ftp.c

  • Committer: Bazaar Package Importer
  • Author(s): Ramakrishnan Muthukrishnan
  • Date: 2011-02-28 19:35:36 UTC
  • mto: (3.6.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: james.westby@ubuntu.com-20110228193536-p3a9jawxxofcsz7o
Tags: upstream-7.21.4
ImportĀ upstreamĀ versionĀ 7.21.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
322
322
  curl_socklen_t size = (curl_socklen_t) sizeof(add);
323
323
 
324
324
  for(;;) {
325
 
    timeout_ms = Curl_timeleft(conn, NULL, TRUE);
 
325
    timeout_ms = Curl_timeleft(data, NULL, TRUE);
326
326
 
327
327
    if(timeout_ms < 0) {
328
328
      /* if a timeout was already reached, bail out */
1841
1841
         ftpc->file &&
1842
1842
         data->set.get_filetime &&
1843
1843
         (data->info.filetime>=0) ) {
1844
 
        struct tm *tm;
1845
1844
        time_t filetime = (time_t)data->info.filetime;
1846
 
#ifdef HAVE_GMTIME_R
1847
1845
        struct tm buffer;
1848
 
        tm = (struct tm *)gmtime_r(&filetime, &buffer);
1849
 
#else
1850
 
        tm = gmtime(&filetime);
1851
 
#endif
 
1846
        const struct tm *tm = &buffer;
 
1847
 
 
1848
        result = Curl_gmtime(filetime, &buffer);
 
1849
        if(result)
 
1850
          return result;
 
1851
 
1852
1852
        /* format: "Tue, 15 Nov 1994 12:45:26" */
1853
1853
        snprintf(buf, BUFSIZE-1,
1854
1854
                 "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",