Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue, reported via email, where a client connection breaks be… #24

Merged
merged 1 commit into from
Nov 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions mod_proxy_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# include <sys/uio.h>
#endif /* HAVE_SYS_UIO_H */

#define MOD_PROXY_PROTOCOL_VERSION "mod_proxy_protocol/0.5"
#define MOD_PROXY_PROTOCOL_VERSION "mod_proxy_protocol/0.6"

/* Make sure the version of proftpd is as necessary. */
#if PROFTPD_VERSION_NUMBER < 0x0001030507
Expand Down Expand Up @@ -255,21 +255,21 @@ static int readv_sock(int sockfd, const struct iovec *iov, int count) {

return -1;
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This turned out to be the culprit: misleading indentation.


/* If we read zero bytes here, treat it as an EOF and hang up on
* the uncommunicative client.
*/
/* If we read zero bytes here, treat it as an EOF and hang up on
* the uncommunicative client.
*/

pr_trace_msg(trace_channel, 16, "%s",
"disconnecting client (received EOF)");
pr_log_debug(DEBUG0, MOD_PROXY_PROTOCOL_VERSION
": disconnecting client (received EOF)");
pr_session_disconnect(&proxy_protocol_module,
PR_SESS_DISCONNECT_CLIENT_EOF, NULL);
pr_trace_msg(trace_channel, 16, "%s",
"disconnecting client (received EOF)");
pr_log_debug(DEBUG0, MOD_PROXY_PROTOCOL_VERSION
": disconnecting client (received EOF)");
pr_session_disconnect(&proxy_protocol_module,
PR_SESS_DISCONNECT_CLIENT_EOF, NULL);

errno = ENOENT;
return -1;
}
errno = ENOENT;
return -1;
}

session.total_raw_in += res;
Expand Down