diff options
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r-- | lib/libalpm/handle.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index d1a35ad9..5cbf363a 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -79,6 +79,7 @@ void _alpm_handle_free(pmhandle_t *handle) FREELIST(handle->cachedirs); FREE(handle->logfile); FREE(handle->lockfile); + FREE(handle->arch); FREELIST(handle->dbs_sync); FREELIST(handle->noupgrade); FREELIST(handle->noextract); @@ -168,7 +169,7 @@ const char SYMEXPORT *alpm_option_get_lockfile() return handle->lockfile; } -unsigned short SYMEXPORT alpm_option_get_usesyslog() +int SYMEXPORT alpm_option_get_usesyslog() { if (handle == NULL) { pm_errno = PM_ERR_HANDLE_NULL; @@ -213,13 +214,22 @@ alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps() return handle->ignoregrp; } -unsigned short SYMEXPORT alpm_option_get_nopassiveftp() +const char SYMEXPORT *alpm_option_get_arch() +{ + if (handle == NULL) { + pm_errno = PM_ERR_HANDLE_NULL; + return NULL; + } + return handle->arch; +} + +int SYMEXPORT alpm_option_get_usedelta() { if (handle == NULL) { pm_errno = PM_ERR_HANDLE_NULL; return -1; } - return handle->nopassiveftp; + return handle->usedelta; } pmdb_t SYMEXPORT *alpm_option_get_localdb() @@ -436,7 +446,7 @@ int SYMEXPORT alpm_option_set_logfile(const char *logfile) return(0); } -void SYMEXPORT alpm_option_set_usesyslog(unsigned short usesyslog) +void SYMEXPORT alpm_option_set_usesyslog(int usesyslog) { handle->usesyslog = usesyslog; } @@ -529,12 +539,13 @@ int SYMEXPORT alpm_option_remove_ignoregrp(const char *grp) return(0); } -void SYMEXPORT alpm_option_set_nopassiveftp(unsigned short nopasv) +void SYMEXPORT alpm_option_set_arch(const char *arch) { - handle->nopassiveftp = nopasv; + if(handle->arch) FREE(handle->arch); + if(arch) handle->arch = strdup(arch); } -void SYMEXPORT alpm_option_set_usedelta(unsigned short usedelta) +void SYMEXPORT alpm_option_set_usedelta(int usedelta) { handle->usedelta = usedelta; } |