From 27c513832410ae433e84ecb7ad7923ec60183524 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 7 Nov 2011 19:56:30 +0100 Subject: [PATCH] xbps-bin: use xbps_fetch_error_string in reposync err cb. --- bin/xbps-bin/trans_cb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/xbps-bin/trans_cb.c b/bin/xbps-bin/trans_cb.c index 114f989d..a22bbb03 100644 --- a/bin/xbps-bin/trans_cb.c +++ b/bin/xbps-bin/trans_cb.c @@ -92,6 +92,7 @@ void transaction_err_cb(struct xbps_transaction_cb_data *xtcd) { const char *state_descr = NULL; + const char *res = xbps_fetch_error_string(); switch (xtcd->state) { case XBPS_TRANS_STATE_DOWNLOAD: @@ -120,7 +121,7 @@ transaction_err_cb(struct xbps_transaction_cb_data *xtcd) break; case XBPS_TRANS_STATE_REPOSYNC: xbps_error_printf("Failed to sync pkg-index: %s\n", - strerror(xtcd->err)); + res ? res : strerror(xtcd->err)); return; default: state_descr = "unknown transaction state";