Mercurial > gftp.yaz
changeset 667:6b6fbcf76d00
2005-1-18 Brian Masney <masneyb@gftp.org>
* lib/fsplib/fsplib.[ch] - updated files from FSPLIB 0.3
author | masneyb |
---|---|
date | Wed, 19 Jan 2005 02:05:56 +0000 |
parents | 8ff1c1647b95 |
children | 850526fbe0ee |
files | ChangeLog lib/fsplib/fsplib.c lib/fsplib/fsplib.h |
diffstat | 3 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jan 19 01:56:48 2005 +0000 +++ b/ChangeLog Wed Jan 19 02:05:56 2005 +0000 @@ -1,4 +1,6 @@ 2005-1-18 Brian Masney <masneyb@gftp.org> + * lib/fsplib/fsplib.[ch] - updated files from FSPLIB 0.3 + * lib/protocols.c (gftp_get_next_file) - if the remote server sends a path with the filename, then strip the path off of the filename. If the path didn't match the current directory, then give the user a warning. @@ -3231,7 +3233,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.394 2005/01/19 01:56:48 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.395 2005/01/19 02:05:56 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/lib/fsplib/fsplib.c Wed Jan 19 01:56:48 2005 +0000 +++ b/lib/fsplib/fsplib.c Wed Jan 19 02:05:56 2005 +0000 @@ -2,7 +2,7 @@ This file is part of fsplib - FSP protocol stack implemented in C language. See http://fsp.sourceforge.net for more information. -Copyright (c) 2003-2004 by Radim HSN Kolar (hsn@netmag.cz) +Copyright (c) 2003-2005 by Radim HSN Kolar (hsn@netmag.cz) You may copy or modify this file in any manner you wish, provided that this notice is always included, and that you hold the author @@ -251,6 +251,7 @@ /* compute initial delay here */ /* we are using hardcoded value for now */ f_delay = 1340; + l_delay = 0; for(;;retry++) { if(t_delay >= s->timeout) @@ -578,6 +579,7 @@ { FSP_RDENTRY fentry,*fresult; int rc; + char *c; if (dir == NULL || entry == NULL || *result == NULL) return -EINVAL; @@ -595,6 +597,17 @@ entry->d_type=DT_DIR; else entry->d_type=DT_REG; + + /* remove symlink destination */ + c=strchr(fentry.name,'\n'); + if (c) + { + *c='\0'; + rc=fentry.namlen-strlen(fentry.name); + fentry.reclen-=rc; + fentry.namlen-=rc; + } + entry->d_fileno = 10; entry->d_reclen = fentry.reclen; strncpy(entry->d_name,fentry.name,MAXNAMLEN); @@ -602,7 +615,7 @@ if (fentry.namlen > MAXNAMLEN) { entry->d_name[MAXNAMLEN + 1 ] = '\0'; -#ifdef HAVE_NAMLEN +#ifdef HAVE_NAMLEN entry->d_namlen = MAXNAMLEN; } else {
--- a/lib/fsplib/fsplib.h Wed Jan 19 01:56:48 2005 +0000 +++ b/lib/fsplib/fsplib.h Wed Jan 19 02:05:56 2005 +0000 @@ -7,7 +7,7 @@ This file is part of fsplib - FSP protocol stack implemented in C language. See http://fsp.sourceforge.net for more information. -Copyright (c) 2003-2004 by Radim HSN Kolar (hsn@netmag.cz) +Copyright (c) 2003-2005 by Radim HSN Kolar (hsn@netmag.cz) You may copy or modify this file in any manner you wish, provided that this notice is always included, and that you hold the author