From: Panu Matilainen Date: Wed, 4 Jan 2012 09:31:00 +0000 (+0200) Subject: Use rpmtsNotify() directly for psm error callbacks X-Git-Tag: tznext/4.11.0.1.tizen20130304~744 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=033037a3b0e3f4f7a407223ee685a11900d3f92f;p=tools%2Flibrpm-tizen.git 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. --- 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);