From e7953dcf1376631719c73d9fa34bcb96752d3794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 8 Dec 2022 15:27:22 +0100 Subject: cpp: Handle status errors in the base edit interactor * lang/cpp/src/editinteractor.cpp (edit_interactor_callback_impl): Handle status errors. * lang/cpp/src/gpgrevokekeyeditinteractor.cpp (GpgRevokeKeyEditInteractor::Private::nextState): Remove handling of status errors. -- With this change status errors are handled for all interactors. In particular, this makes all edit interactors handle canceled password prompts correctly. GnuPG-bug-id: 6305 --- lang/cpp/src/editinteractor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lang/cpp/src/editinteractor.cpp') diff --git a/lang/cpp/src/editinteractor.cpp b/lang/cpp/src/editinteractor.cpp index 707bf8b9..373a4464 100644 --- a/lang/cpp/src/editinteractor.cpp +++ b/lang/cpp/src/editinteractor.cpp @@ -99,6 +99,9 @@ public: if (ei->q->needsNoResponse(status)) { // keep state + } else if (status == GPGME_STATUS_ERROR) { + err = ei->q->parseStatusError(args); + ei->state = EditInteractor::ErrorState; } else { ei->state = ei->q->nextState(status, args, err); } -- cgit v1.2.3