#define LIST_FILENAME ".listing"
#endif
+#define max(a, b) ((a > b) ? (a) : (b))
+
typedef struct
{
int st; /* connection status */
if (!opt.server_response)
logputs (LOG_VERBOSE, _("done.\n"));
- expected_bytes = ftp_expected_bytes (ftp_last_respline);
+
+ expected_bytes = max (ftp_expected_bytes (ftp_last_respline),
+ expected_bytes);
} /* do retrieve */
if (cmd & DO_LIST)
}
if (!opt.server_response)
logputs (LOG_VERBOSE, _("done.\n"));
- expected_bytes = ftp_expected_bytes (ftp_last_respline);
+ expected_bytes = max (ftp_expected_bytes (ftp_last_respline),
+ expected_bytes);
} /* cmd & DO_LIST */
if (!(cmd & (DO_LIST | DO_RETR)) || (opt.spider && !(cmd & DO_LIST)))