Skip to content

Commit

Permalink
Add patch for gridcf/gct#117 "Restore log transfer functionality that…
Browse files Browse the repository at this point in the history
… was accidentally removed" (SOFTWARE-4041)

git-svn-id: https://vdt.cs.wisc.edu/svn/native/redhat/trunk@25620 4e558342-562e-0410-864c-e07659590f8c
  • Loading branch information
matyasselmeci committed Mar 26, 2020
1 parent f746829 commit bc49a11
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
From 7e331c37b0936b704884448244184e51bb5c949b Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 9 Jan 2020 14:55:24 +0100
Subject: [PATCH] GCT #117: Restore log transfer functionality that was
accidentally removed

---
globus_i_gfs_data.c | 70 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)

diff --git a/globus_i_gfs_data.c b/globus_i_gfs_data.c
index bc7a086..2d6b50f 100644
--- a/globus_i_gfs_data.c
+++ b/globus_i_gfs_data.c
@@ -10435,6 +10435,76 @@ globus_l_gfs_data_end_transfer_kickout(
}
}

+ /* log transfer */
+ if(op->node_ndx == 0 &&
+ op->cached_res == GLOBUS_SUCCESS &&
+ globus_i_gfs_config_string("log_transfer"))
+ {
+ char * type;
+ globus_gfs_transfer_info_t * info;
+ struct timeval end_timeval;
+
+ info = (globus_gfs_transfer_info_t *) op->info_struct;
+
+ if(op->writing)
+ {
+ if(info->list_type)
+ {
+ if(strncmp(info->list_type, "LIST:", 5) == 0)
+ {
+ type = "LIST";
+ }
+ else if(strncmp(info->list_type, "NLST:", 5) == 0)
+ {
+ type = "NLST";
+ }
+ else
+ {
+ type = "MLSD";
+ }
+ }
+ else if(info->module_name || info->partial_offset != 0 ||
+ info->partial_length != -1)
+ {
+ type = "ERET";
+ }
+ else
+ {
+ type = "RETR";
+ }
+ }
+ else
+ {
+ if(info->module_name || info->partial_offset != 0 ||
+ !info->truncate)
+ {
+ type = "ESTO";
+ }
+ else
+ {
+ type = "STOR";
+ }
+ }
+ gettimeofday(&end_timeval, NULL);
+
+ globus_i_gfs_log_transfer(
+ op->node_count,
+ op->data_handle->info.nstreams,
+ &op->start_timeval,
+ &end_timeval,
+ op->remote_ip ? op->remote_ip : "0.0.0.0",
+ op->data_handle->info.blocksize,
+ op->data_handle->info.tcp_bufsize,
+ info->pathname,
+ op->bytes_transferred,
+ 226,
+ "/",
+ type,
+ op->session_handle->username,
+ retransmit_str,
+ op->session_handle->taskid);
+ }
+
if(retransmit_str)
{
globus_free(retransmit_str);
--
2.25.1

7 changes: 6 additions & 1 deletion globus-gridftp-server/osg/globus-gridftp-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Name: globus-gridftp-server
%global _name %(tr - _ <<< %{name})
Version: 13.20
Release: 1%{?dist}
Release: 1.1%{?dist}
Summary: Grid Community Toolkit - Globus GridFTP Server

License: ASL 2.0
Expand All @@ -20,6 +20,7 @@ Source2: globus-gridftp-sshftp.service
Source3: %{name}
Source4: globus-gridftp-sshftp
Source8: README
Patch0: GCT-117-Restore-log-transfer-functionality-that-was-.patch

BuildRequires: gcc
BuildRequires: globus-common-devel >= 17
Expand Down Expand Up @@ -102,6 +103,7 @@ Globus GridFTP Server Development Files

%prep
%setup -q -n %{_name}-%{version}
%patch0 -p1

%build
# Reduce overlinking
Expand Down Expand Up @@ -234,6 +236,9 @@ fi
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Thu Mar 26 2020 Mátyás Selmeci <matyas@cs.wisc.edu> - 13.20-1.1.osg
- Add patch for gridcf/gct#117 "Restore log transfer functionality that was accidentally removed" (SOFTWARE-4041)

* Fri Aug 30 2019 Mattias Ellert <mattias.ellert@physics.uu.se> - 13.20-1
- Fake stat responses when slow listings enabled (13.12)
- Send markers in stream mode when requested by 'OPTS RETR Markers=n;'
Expand Down

0 comments on commit bc49a11

Please sign in to comment.