diff --git a/ChangeLog b/ChangeLog index 40f64a7..28c7f02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,9 @@ Version NEXT Now if you want to overwrite file you must have permission for deleting and adding files or be directory owner. Turning on debug in SCons turns on maintainer mode also. + Upload starting at zero position are now always allowed no matter if + source port was reused or not. Old code did that but not over + server restarts. Version 2.8.1b25 - 10 Sep 2009 GNU autotools build system was entirely replaced by SCons diff --git a/server/file.c b/server/file.c index d55f8bc..dc53139 100644 --- a/server/file.c +++ b/server/file.c @@ -833,6 +833,8 @@ const char *server_up_load (char * data, unsigned int len, unsigned long pos, { fclose(fp); unlink(tname); + if ( pos == 0 ) + return server_up_load(data, len, pos, inet_num, port_num); return("Non continuous upload detected. Restart upload please."); } /* seek to starting position */ @@ -867,6 +869,8 @@ const char *server_up_load (char * data, unsigned int len, unsigned long pos, { f_cache_delete_entry(fpcache,cache_f); unlink(tname); + if ( pos == 0 ) + return server_up_load(data, len, pos, inet_num, port_num); return("Non continuous upload detected. Restart upload please."); } if ( pos != sf.st_size )