summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-20 12:32:32 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-20 12:32:32 +0000
commit4744a2a764caec2d50405f58f025cb0e91a5d572 (patch)
tree2ad635eb7bcd4bd8799cc01754ab22b6bb12d8fe /src
parent1ace50e2a867f9a6e59dcaaa653a9fc51509f801 (diff)
added support for the XFERCOMMAND option
Diffstat (limited to 'src')
-rw-r--r--src/pacman/conf.c9
1 files changed, 6 insertions, 3 deletions
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) {