diff options
author | Chantry Xavier <shiningxc@gmail.com> | 2007-08-30 00:39:57 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-09-06 19:45:16 -0500 |
commit | b15a5194d1a8485a2769560e49e6ff03e1862533 (patch) | |
tree | 0b97fac43b59b1fb787b6e7c1c159ccdd334518c | |
parent | 53fc745aedc0a6d24abbc8bce6ca0b30c2179e5f (diff) | |
download | pacman-b15a5194d1a8485a2769560e49e6ff03e1862533.tar.xz |
libalpm/trans.c : remove the lock even on interrupted transactions.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
-rw-r--r-- | lib/libalpm/trans.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index c0e38c78..fe37a1f9 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -171,6 +171,7 @@ int SYMEXPORT alpm_trans_commit(alpm_list_t **data) int SYMEXPORT alpm_trans_release() { pmtrans_t *trans; + int ret = 0; ALPM_LOG_FUNC; @@ -187,7 +188,7 @@ int SYMEXPORT alpm_trans_release() trans->state = STATE_INTERRUPTED; } pm_errno = PM_ERR_TRANS_COMMITING; - return(-1); + ret = -1; } _alpm_trans_free(trans); @@ -205,7 +206,7 @@ int SYMEXPORT alpm_trans_release() alpm_option_get_lockfile()); } - return(0); + return(ret); } /** @} */ |