diff -u --recursive afd-1.4.7-11/configure.ac afd-1.4.7-12/configure.ac
--- afd-1.4.7-11/configure.ac 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/configure.ac 2019-04-02 09:39:42.000000000 +0200
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
-AC_INIT([afd], [1.4.7-11], [Holger.Kiehl@dwd.de])
+AC_INIT([afd], [1.4.7-12], [Holger.Kiehl@dwd.de])
AC_CONFIG_SRCDIR(src/init_afd/afd.c)
AC_CONFIG_AUX_DIR(ac-tools)
dnl# AC_PREFIX_DEFAULT("/usr/local/afd")
diff -u --recursive afd-1.4.7-11/doc/html-en/download.html afd-1.4.7-12/doc/html-en/download.html
--- afd-1.4.7-11/doc/html-en/download.html 2018-12-12 17:08:59.000000000 +0100
+++ afd-1.4.7-12/doc/html-en/download.html 2019-04-02 11:29:31.742476666 +0200
@@ -31,7 +31,7 @@
- Download via HTTPS.
- Latest stable release is
- 1.4.7-11.tar.bz2, source code and documentation. To see what
+ 1.4.7-12.tar.bz2, source code and documentation. To see what
has been changed read Changelog. If you
upgrade from version 1.2.x please read and follow the instruction in
this text file.
@@ -53,9 +53,9 @@
- Copyright © 2000 - 2018 by H.Kiehl
+ Copyright © 2000 - 2019 by H.Kiehl
Holger.Kiehl@dwd.de
- Last updated: 12.12.2018
+ Last updated: 02.04.2019
|
Index |
Home |
diff -u --recursive afd-1.4.7-11/src/fd/delete_wrapper_ftp.c afd-1.4.7-12/src/fd/delete_wrapper_ftp.c
--- afd-1.4.7-11/src/fd/delete_wrapper_ftp.c 2014-07-20 17:20:56.000000000 +0200
+++ afd-1.4.7-12/src/fd/delete_wrapper_ftp.c 2019-04-02 09:53:09.000000000 +0200
@@ -54,7 +54,7 @@
{
int ret;
- ret = ftp_dele(file_name);;
+ ret = ftp_dele(file_name);
if (ret != SUCCESS)
{
trans_log(WARN_SIGN, __FILE__, __LINE__, NULL, msg_str,
diff -u --recursive afd-1.4.7-11/src/fd/gf_http.c afd-1.4.7-12/src/fd/gf_http.c
--- afd-1.4.7-11/src/fd/gf_http.c 2018-12-10 15:55:36.000000000 +0100
+++ afd-1.4.7-12/src/fd/gf_http.c 2019-04-02 10:36:33.000000000 +0200
@@ -1,6 +1,6 @@
/*
* gf_http.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 2003 - 2015 Holger Kiehl
+ * Copyright (c) 2003 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -379,6 +379,7 @@
if ((in_burst_loop == NO) || (values_changed & TARGET_DIR_CHANGED))
{
#endif /* _WITH_BURST_2 */
+#ifdef WITH_OPTIONS_CALL
if ((status = http_options(db.hostname, db.target_dir)) != SUCCESS)
{
trans_log((timeout_flag == ON) ? ERROR_SIGN : DEBUG_SIGN,
@@ -398,6 +399,7 @@
"Got HTTP server options.");
}
}
+#endif /* WITH_OPTIONS_CALL */
#ifdef _WITH_BURST_2
}
#endif /* _WITH_BURST_2 */
diff -u --recursive afd-1.4.7-11/src/fd/sf_ftp.c afd-1.4.7-12/src/fd/sf_ftp.c
--- afd-1.4.7-11/src/fd/sf_ftp.c 2018-12-10 15:46:28.000000000 +0100
+++ afd-1.4.7-12/src/fd/sf_ftp.c 2019-04-02 09:43:25.000000000 +0200
@@ -1,6 +1,6 @@
/*
* sf_ftp.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 1995 - 2015 Deutscher Wetterdienst (DWD),
+ * Copyright (c) 1995 - 2019 Deutscher Wetterdienst (DWD),
* Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
@@ -2526,10 +2526,6 @@
{
off_t remote_size = -1;
- if (simulation_mode == YES)
- {
- remote_size = no_of_bytes + append_offset + additional_length;
- }
if ((fsa->file_size_offset == AUTO_SIZE_DETECT) ||
(fsa->file_size_offset == -1)) /* ie. None */
{
@@ -2544,6 +2540,10 @@
}
else
{
+ if (simulation_mode == YES)
+ {
+ remote_size = no_of_bytes + append_offset + additional_length;
+ }
if (fsa->debug > NORMAL_MODE)
{
trans_db_log(INFO_SIGN, __FILE__, __LINE__, msg_str,
diff -u --recursive afd-1.4.7-11/src/fd/sf_sftp.c afd-1.4.7-12/src/fd/sf_sftp.c
--- afd-1.4.7-11/src/fd/sf_sftp.c 2018-12-10 15:48:27.000000000 +0100
+++ afd-1.4.7-12/src/fd/sf_sftp.c 2019-04-02 09:45:45.000000000 +0200
@@ -1,6 +1,6 @@
/*
* sf_sftp.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 2006 - 2015 Holger Kiehl
+ * Copyright (c) 2006 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1434,10 +1434,6 @@
{
struct stat stat_buf;
- if (simulation_mode == YES)
- {
- stat_buf.st_size = *p_file_size_buffer;
- }
if ((status = sftp_stat(initial_filename,
&stat_buf)) != SUCCESS)
{
@@ -1447,6 +1443,10 @@
sftp_quit();
exit(eval_timeout(STAT_TARGET_ERROR));
}
+ if (simulation_mode == YES)
+ {
+ stat_buf.st_size = *p_file_size_buffer;
+ }
if (stat_buf.st_size != (no_of_bytes + append_offset + additional_length))
{
diff -u --recursive afd-1.4.7-11/src/fd/update_tfc.c afd-1.4.7-12/src/fd/update_tfc.c
--- afd-1.4.7-11/src/fd/update_tfc.c 2015-10-28 09:51:48.000000000 +0100
+++ afd-1.4.7-12/src/fd/update_tfc.c 2019-04-02 09:50:54.000000000 +0200
@@ -1,6 +1,6 @@
/*
* update_tfc.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 2009 - 2015 Holger Kiehl
+ * Copyright (c) 2009 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -84,10 +84,10 @@
{
total_file_counter = 0;
}
- system_log(DEBUG_SIGN, __FILE__, __LINE__,
- "Total file counter for host %s less then zero. Correcting to %d. [%s] #%x",
- fsa->host_dsp_name, total_file_counter,
- db.msg_name, db.id.job);
+ trans_log(DEBUG_SIGN, __FILE__, __LINE__, "update_tfc", NULL,
+ "Total file counter for host %s less then zero. Correcting to %d. [%s] #%x",
+ fsa->host_dsp_name, total_file_counter,
+ db.msg_name, db.id.job);
fsa->total_file_counter = total_file_counter;
}
#endif
@@ -106,21 +106,21 @@
{
fsa->total_file_size += *tmp_ptr;
}
- system_log(DEBUG_SIGN, __FILE__, __LINE__,
+ trans_log(DEBUG_SIGN, __FILE__, __LINE__, "update_tfc", NULL,
# if SIZEOF_OFF_T == 4
- "Total file size for host %s overflowed. Correcting to %ld. [%s] #%x",
+ "Total file size for host %s overflowed. Correcting to %ld. [%s] #%x",
# else
- "Total file size for host %s overflowed. Correcting to %lld. [%s] #%x",
+ "Total file size for host %s overflowed. Correcting to %lld. [%s] #%x",
# endif
- fsa->host_dsp_name, (pri_off_t)fsa->total_file_size,
- db.msg_name, db.id.job);
+ fsa->host_dsp_name, (pri_off_t)fsa->total_file_size,
+ db.msg_name, db.id.job);
}
else if ((fsa->total_file_counter == 0) &&
(fsa->total_file_size > 0))
{
- system_log(DEBUG_SIGN, __FILE__, __LINE__,
- "fc for host %s is zero but fs is not zero. Correcting. [%s] #%x",
- fsa->host_dsp_name, db.msg_name, db.id.job);
+ trans_log(DEBUG_SIGN, __FILE__, __LINE__, "update_tfc", NULL,
+ "fc for host %s is zero but fs is not zero. Correcting. [%s] #%x",
+ fsa->host_dsp_name, db.msg_name, db.id.job);
fsa->total_file_size = 0;
}
#endif
diff -u --recursive afd-1.4.7-11/src/misc/assemble.c afd-1.4.7-12/src/misc/assemble.c
--- afd-1.4.7-11/src/misc/assemble.c 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/src/misc/assemble.c 2019-04-02 10:18:44.000000000 +0200
@@ -1,6 +1,6 @@
/*
* assemble.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 1999 - 2014 Holger Kiehl
+ * Copyright (c) 1999 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -521,10 +521,19 @@
"Data length (%d) greater then what is possible in WMO header size, inserting maximum possible 99999999.",
length);
}
- else
- {
- (void)snprintf((char *)buffer, 10, "%08d", length);
- }
+ else if (length < 0)
+ {
+ buffer[0] = buffer[1] = buffer[2] = buffer[3] = '0';
+ buffer[4] = buffer[5] = buffer[6] = buffer[7] = '0';
+ buffer[8] = '\0';
+ receive_log(WARN_SIGN, __FILE__, __LINE__, 0L,
+ "Data length is less then 0 (%d), inserting 00000000.",
+ length);
+ }
+ else
+ {
+ (void)snprintf((char *)buffer, 10, "%08d", length);
+ }
write_length = 10;
buffer[8] = '0';
if (have_sohetx == YES)
diff -u --recursive afd-1.4.7-11/src/misc/bin_file_chopper.c afd-1.4.7-12/src/misc/bin_file_chopper.c
--- afd-1.4.7-11/src/misc/bin_file_chopper.c 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/src/misc/bin_file_chopper.c 2019-04-02 10:19:14.000000000 +0200
@@ -1,6 +1,6 @@
/*
* bin_file_chopper.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 1996 - 2014 Deutscher Wetterdienst (DWD),
+ * Copyright (c) 1996 - 2019 Deutscher Wetterdienst (DWD),
* Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
@@ -1010,15 +1010,26 @@
#endif
(pri_off_t)(data_length + 8));
}
- else
- {
- (void)snprintf(length_indicator, 15,
+ else if ((data_length + 8) < 0)
+ {
+ (void)strcpy(length_indicator, "00000000");
+ receive_log(WARN_SIGN, __FILE__, __LINE__, 0L,
#if SIZEOF_OFF_T == 4
- "%08ld00", (pri_off_t)(data_length + 8));
+ "Data length (%ld) is less then 0, inserting 00000000.",
#else
- "%08lld00", (pri_off_t)(data_length + 8));
+ "Data length (%lld) is less then 0, inserting 00000000.",
#endif
- }
+ (pri_off_t)(data_length + 8));
+ }
+ else
+ {
+ (void)snprintf(length_indicator, 15,
+#if SIZEOF_OFF_T == 4
+ "%08ld00", (pri_off_t)(data_length + 8));
+#else
+ "%08lld00", (pri_off_t)(data_length + 8));
+#endif
+ }
length_indicator[10] = 1;
length_indicator[11] = 13;
length_indicator[12] = 13;
diff -u --recursive afd-1.4.7-11/src/protocols/httpcmd.c afd-1.4.7-12/src/protocols/httpcmd.c
--- afd-1.4.7-11/src/protocols/httpcmd.c 2018-12-10 22:40:30.000000000 +0100
+++ afd-1.4.7-12/src/protocols/httpcmd.c 2019-04-02 10:39:28.000000000 +0200
@@ -1,6 +1,6 @@
/*
* httpcmd.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 2003 - 2015 Holger Kiehl
+ * Copyright (c) 2003 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1005,7 +1005,7 @@
}
retry_get:
if ((reply = command(http_fd,
- "GET %s HTTP/1.1\r\n%sUser-Agent: AFD/%s\r\n%sHost: %s\r\nAccept: */*\r\n",
+ "GET %s HTTP/1.1\r\n%sUser-Agent: AFD/%s\r\n%sHost: %s\r\nContent-length: 0\r\nAccept: */*\r\n",
resource, range, PACKAGE_VERSION,
(hmr.authorization == NULL) ? "" : hmr.authorization,
host)) == SUCCESS)
@@ -1264,7 +1264,7 @@
}
retry_del:
if ((reply = command(http_fd,
- "DELETE %s HTTP/1.1\r\nUser-Agent: AFD/%s\r\n%sHost: %s\r\n",
+ "DELETE %s HTTP/1.1\r\nUser-Agent: AFD/%s\r\n%sHost: %s\r\nContent-length: 0\r\n",
resource, PACKAGE_VERSION,
(hmr.authorization == NULL) ? "" : hmr.authorization,
host)) == SUCCESS)
@@ -1368,7 +1368,7 @@
}
retry_options:
if ((reply = command(http_fd,
- "OPTIONS %s HTTP/1.1\r\nUser-Agent: AFD/%s\r\n%sHost: %s\r\nAccept: */*\r\n",
+ "OPTIONS %s HTTP/1.1\r\nUser-Agent: AFD/%s\r\n%sHost: %s\r\nContent-length: 0\r\nAccept: */*\r\n",
resource,
PACKAGE_VERSION,
(hmr.authorization == NULL) ? "" : hmr.authorization,
@@ -1509,7 +1509,7 @@
}
retry_head:
if ((reply = command(http_fd,
- "HEAD %s HTTP/1.1\r\nUser-Agent: AFD/%s\r\n%sHost: %s\r\nAccept: */*\r\n",
+ "HEAD %s HTTP/1.1\r\nUser-Agent: AFD/%s\r\n%sHost: %s\r\nContent-length: 0\r\nAccept: */*\r\n",
resource, PACKAGE_VERSION,
(hmr.authorization == NULL) ? "" : hmr.authorization,
host)) == SUCCESS)
diff -u --recursive afd-1.4.7-11/src/protocols/sftpcmd.c afd-1.4.7-12/src/protocols/sftpcmd.c
--- afd-1.4.7-11/src/protocols/sftpcmd.c 2018-12-10 13:37:47.000000000 +0100
+++ afd-1.4.7-12/src/protocols/sftpcmd.c 2019-04-02 10:13:19.000000000 +0200
@@ -1,6 +1,6 @@
/*
* sftpcmd.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 2005 - 2016 Holger Kiehl
+ * Copyright (c) 2005 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1725,7 +1725,7 @@
{
if (msg[0] == SSH_FXP_STATUS)
{
- if (get_xfer_uint(&msg[5]) == SSH_FX_OK)
+ if (get_xfer_uint(&msg[5]) != SSH_FX_OK)
{
/* Some error has occured. */
get_msg_str(&msg[9]);
@@ -2670,7 +2670,7 @@
{
int i;
- for (i = 0; i < scd.stored_replies; i++)
+ for (i = 0; i < scd.stored_replies && i < MAX_SFTP_REPLY_BUFFER; i++)
{
if (scd.sm[i].request_id == id)
{
diff -u --recursive afd-1.4.7-11/src/tools/fra_view.c afd-1.4.7-12/src/tools/fra_view.c
--- afd-1.4.7-11/src/tools/fra_view.c 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/src/tools/fra_view.c 2019-04-02 09:55:02.000000000 +0200
@@ -645,6 +645,10 @@
{
(void)fprintf(stdout, "LOC\n");
}
+ else if (fra[i].protocol == SFTP)
+ {
+ (void)fprintf(stdout, "SFTP\n");
+ }
else if (fra[i].protocol == HTTP)
{
(void)fprintf(stdout, "HTTP\n");
diff -u --recursive afd-1.4.7-11/src/UI/common/ui_common_defs.h afd-1.4.7-12/src/UI/common/ui_common_defs.h
--- afd-1.4.7-11/src/UI/common/ui_common_defs.h 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/src/UI/common/ui_common_defs.h 2019-04-02 10:10:10.000000000 +0200
@@ -1,6 +1,6 @@
/*
* ui_common_defs.h - Part of AFD, an automatic file distribution program.
- * Copyright (c) 2007 - 2014 Holger Kiehl
+ * Copyright (c) 2007 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,7 +49,11 @@
#define ZOMBIE_CHECK_INTERVAL 2000 /* 2 seconds */
#define MAX_VIEW_DATA_WINDOWS 4
#define ADDITIONAL_INFO_LENGTH 50
-#define MAX_INFO_STRING_LENGTH 65
+#if MAX_REAL_HOSTNAME_LENGTH > 65
+# define MAX_INFO_STRING_LENGTH MAX_REAL_HOSTNAME_LENGTH + 1
+#else
+# define MAX_INFO_STRING_LENGTH 65
+#endif
/* Definitions for the printer interface. */
#define SELECTION_TOGGLE 1
diff -u --recursive afd-1.4.7-11/src/UI/Motif/mshow_log/mshow_log.c afd-1.4.7-12/src/UI/Motif/mshow_log/mshow_log.c
--- afd-1.4.7-11/src/UI/Motif/mshow_log/mshow_log.c 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/src/UI/Motif/mshow_log/mshow_log.c 2019-04-02 10:32:57.000000000 +0200
@@ -1,6 +1,6 @@
/*
* mshow_log.c - Part of AFD, an automatic file distribution program.
- * Copyright (c) 1996 - 2014 Holger Kiehl
+ * Copyright (c) 1996 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -347,29 +347,42 @@
toggle = XtVaCreateManagedWidget(toggle_label[4],
xmToggleButtonGadgetClass, togglebox,
XmNfontList, fontlist,
- XmNset, False,
+ XmNset, True,
NULL);
XtAddCallback(toggle, XmNvalueChangedCallback,
(XtCallbackProc)toggled, (XtPointer)SHOW_OFFLINE);
- toggle = XtVaCreateManagedWidget(toggle_label[5],
- xmToggleButtonGadgetClass, togglebox,
- XmNfontList, fontlist,
- XmNset, False,
- NULL);
- XtAddCallback(toggle, XmNvalueChangedCallback,
- (XtCallbackProc)toggled, (XtPointer)SHOW_DEBUG);
if (log_type_flag == TRANS_DB_LOG_TYPE)
{
+ toggle = XtVaCreateManagedWidget(toggle_label[5],
+ xmToggleButtonGadgetClass, togglebox,
+ XmNfontList, fontlist,
+ XmNset, True,
+ NULL);
+ XtAddCallback(toggle, XmNvalueChangedCallback,
+ (XtCallbackProc)toggled, (XtPointer)SHOW_DEBUG);
toggle = XtVaCreateManagedWidget(toggle_label[6],
xmToggleButtonGadgetClass, togglebox,
XmNfontList, fontlist,
- XmNset, False,
+ XmNset, True,
NULL);
XtAddCallback(toggle, XmNvalueChangedCallback,
(XtCallbackProc)toggled, (XtPointer)SHOW_TRACE);
+ toggles_set = SHOW_INFO | SHOW_CONFIG | SHOW_WARN | SHOW_ERROR |
+ SHOW_FATAL | SHOW_OFFLINE | SHOW_DEBUG | SHOW_TRACE;
+ }
+ else
+ {
+ toggle = XtVaCreateManagedWidget(toggle_label[5],
+ xmToggleButtonGadgetClass, togglebox,
+ XmNfontList, fontlist,
+ XmNset, False,
+ NULL);
+ XtAddCallback(toggle, XmNvalueChangedCallback,
+ (XtCallbackProc)toggled, (XtPointer)SHOW_DEBUG);
+ toggles_set = SHOW_INFO | SHOW_CONFIG | SHOW_WARN | SHOW_ERROR |
+ SHOW_OFFLINE | SHOW_FATAL;
}
XtManageChild(togglebox);
- toggles_set = SHOW_INFO | SHOW_CONFIG | SHOW_WARN | SHOW_ERROR | SHOW_FATAL;
/* Create the first horizontal separator. */
argcount = 0;
diff -u --recursive afd-1.4.7-11/src/version.h afd-1.4.7-12/src/version.h
--- afd-1.4.7-11/src/version.h 2018-12-09 21:32:46.000000000 +0100
+++ afd-1.4.7-12/src/version.h 2019-04-02 09:38:48.000000000 +0200
@@ -1,6 +1,6 @@
/*
* version.h - Part of AFD, an automatic file distribution program.
- * Copyright (c) 1997 - 2013 Holger Kiehl
+ * Copyright (c) 1997 - 2019 Holger Kiehl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
#define VERSION_ID "--version"
#define AFD_MAINTAINER "Holger.Kiehl@dwd.de"
-#define COPYRIGHT_0 "\n\n Copyright (C) 1995 - 2013 Deutscher Wetterdienst, Holger Kiehl.\n\n"
+#define COPYRIGHT_0 "\n\n Copyright (C) 1995 - 2019 Deutscher Wetterdienst, Holger Kiehl.\n\n"
#define COPYRIGHT_1 " This program is free software; you can redistribute it and/or\n"
#define COPYRIGHT_2 " modify it under the terms set out in the COPYING file, which\n"
#define COPYRIGHT_3 " is included in the AFD source distribution.\n\n"