From 033037a3b0e3f4f7a407223ee685a11900d3f92f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 4 Jan 2012 11:31:00 +0200 Subject: [PATCH] Use rpmtsNotify() directly for psm error callbacks - On error we're already on our way out of the psm, no point mucking with the psm state. No functional changes, just makes the code a little bit shorter. --- lib/psm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/psm.c b/lib/psm.c index 6ccb9a7..c23816a 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -837,11 +837,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage) rc = RPMRC_FAIL; /* XXX notify callback on error. */ - psm->what = RPMCALLBACK_UNPACK_ERROR; - psm->amount = 0; - psm->total = 0; - rpmpsmNext(psm, PSM_NOTIFY); - + rpmtsNotify(ts, psm->te, RPMCALLBACK_UNPACK_ERROR, 0, 0); break; } } @@ -955,10 +951,7 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage) psm->goalName, cpioStrerror(rc)); /* XXX notify callback on error. */ - psm->what = RPMCALLBACK_CPIO_ERROR; - psm->amount = 0; - psm->total = 0; - rpmpsmNext(psm, PSM_NOTIFY); + rpmtsNotify(ts, psm->te, RPMCALLBACK_CPIO_ERROR, 0, 0); } psm->failedFile = _free(psm->failedFile); -- 2.7.4