Created
March 28, 2011 22:12
-
-
Save bulletmark/891406 to your computer and use it in GitHub Desktop.
Makes ftpd-topfield clean up closed socket correctly, even when lost ungracefully from vlc >v0.9.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ftpd-topfield/ftpd.c b/ftpd-topfield/ftpd.c | |
index db0b67b..f6d3458 100644 | |
--- a/ftpd-topfield/ftpd.c | |
+++ b/ftpd-topfield/ftpd.c | |
@@ -932,6 +932,7 @@ reboot_topfield (void) | |
void | |
retrieve (const char *cmd, const char *name) | |
{ | |
+ static int in_get; | |
FILE *dout = 0; | |
off_t current = restart_point; | |
tf_dirent dirent; | |
@@ -940,7 +941,6 @@ retrieve (const char *cmd, const char *name) | |
int retries = 0; | |
size_t skip = 0; | |
int aborted = 0; | |
- int in_get = 0; | |
int replied = 0; | |
int eof; | |
@@ -949,6 +949,7 @@ retrieve (const char *cmd, const char *name) | |
int turbo = is_turbo(userpath); | |
+ in_get = 0; | |
aborted = setjmp(abort_buf); | |
abort_buf_valid = 1; | |
transflag = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment