summaryrefslogtreecommitdiffstats
path: root/lib/libftpio/ftpio.h
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-11-14 06:59:41 +0000
committerache <ache@FreeBSD.org>1996-11-14 06:59:41 +0000
commit22406d98dcada3e438c6d4b3b707192f7fb71969 (patch)
treefddc91814c20d646f9cb4eb065e29ea8c51cf709 /lib/libftpio/ftpio.h
parent922ccfd39574911c8000211ea9fcb454fcc70265 (diff)
downloadFreeBSD-src-22406d98dcada3e438c6d4b3b707192f7fb71969.zip
FreeBSD-src-22406d98dcada3e438c6d4b3b707192f7fb71969.tar.gz
For functions ftpGetURL, ftpPutURL, ftpLogin it was impossible to know
FTP error return code because 1) They return NULL, it means that ftpErrno can't be used because it takes file pointer 2) They don't have FILE-type argument as f.e. ftpGet/ftpPut to use it for ftpErrno instead. For that functions I add yet one int* type argument to store FTP error return code. It is impossible to add some global variable for that reason, because user can have multiply FTP connections opened at the same time. So, interface changed, major number bumped. Userland changes will follows. Minor bugfixes, the code: Forget to close file in few places, when failure occurse Forget to NULL cached host name, multiply free is possible
Diffstat (limited to 'lib/libftpio/ftpio.h')
-rw-r--r--lib/libftpio/ftpio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libftpio/ftpio.h b/lib/libftpio/ftpio.h
index 7210531..b057c03 100644
--- a/lib/libftpio/ftpio.h
+++ b/lib/libftpio/ftpio.h
@@ -21,7 +21,7 @@
* Turned inside out. Now returns xfers as new file ids, not as a special
* `state' of FTP_t
*
- * $Id: ftpio.h,v 1.8 1996/09/19 17:28:34 peter Exp $
+ * $Id: ftpio.h,v 1.9 1996/11/14 05:22:12 ache Exp $
*/
/* Internal housekeeping data structure for FTP sessions */
@@ -46,7 +46,7 @@ extern struct ftperr ftpErrList[];
extern int const ftpErrListLength;
/* Exported routines - deal only with FILE* type */
-extern FILE *ftpLogin(char *host, char *user, char *passwd, int port, int verbose);
+extern FILE *ftpLogin(char *host, char *user, char *passwd, int port, int verbose, int *retcode);
extern int ftpChdir(FILE *fp, char *dir);
extern int ftpErrno(FILE *fp);
extern off_t ftpGetSize(FILE *fp, char *file);
@@ -56,8 +56,8 @@ extern int ftpAscii(FILE *fp);
extern int ftpBinary(FILE *fp);
extern int ftpPassive(FILE *fp, int status);
extern void ftpVerbose(FILE *fp, int status);
-extern FILE *ftpGetURL(char *url, char *user, char *passwd);
-extern FILE *ftpPutURL(char *url, char *user, char *passwd);
+extern FILE *ftpGetURL(char *url, char *user, char *passwd, int *retcode);
+extern FILE *ftpPutURL(char *url, char *user, char *passwd, int *retcode);
extern time_t ftpGetModtime(FILE *fp, char *s);
extern const char *ftpErrString(int errno);
OpenPOWER on IntegriCloud