From 4744a2a764caec2d50405f58f025cb0e91a5d572 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sun, 20 Mar 2005 12:32:32 +0000 Subject: added support for the XFERCOMMAND option --- src/pacman/conf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index fa0cb323..3fc5e158 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -38,6 +38,7 @@ extern char *pmo_dbpath; extern list_t *pmo_holdpkg; extern char *pmo_proxyhost; extern unsigned short pmo_proxyport; +extern char *pmo_xfercommand; extern unsigned short pmo_nopassiveftp; extern list_t *pmc_syncs; @@ -190,9 +191,7 @@ int parseconfig(char *file) if(*ptr == '/') { ptr++; } - if(pmo_dbpath) { - FREE(pmo_dbpath); - } + FREE(pmo_dbpath); pmo_dbpath = strdup(ptr); vprint("config: dbpath: %s\n", ptr); } else if (!strcmp(key, "LOGFILE")) { @@ -201,6 +200,10 @@ int parseconfig(char *file) return(1); } vprint("config: log file: %s\n", ptr); + } else if (!strcmp(key, "XFERCOMMAND")) { + FREE(pmo_xfercommand); + pmo_xfercommand = strndup(ptr, PATH_MAX); + vprint("config: xfercommand: %s\n", pmo_xfercommand); } else if (!strcmp(key, "PROXYSERVER")) { char *p; if(pmo_proxyhost) { -- cgit v1.2.3-70-g09d2