summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2014-02-26 16:15:32 +0100
committerSimon Rettberg2014-02-26 16:15:32 +0100
commitb5a992e2f21b7b7c09e0d341750742a982d9efbc (patch)
tree92dc34574df50b9c3c02f0508a0acb578a6844f7 /src
parent[printpwgui] Show message boxes on error whereever possible (diff)
downloadprintergui-b5a992e2f21b7b7c09e0d341750742a982d9efbc.tar.gz
printergui-b5a992e2f21b7b7c09e0d341750742a982d9efbc.tar.xz
printergui-b5a992e2f21b7b7c09e0d341750742a982d9efbc.zip
Fix: run_backend returned wrong status code
Diffstat (limited to 'src')
-rw-r--r--src/pwgui/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pwgui/main.cpp b/src/pwgui/main.cpp
index 1f7ddab..8cccccd 100644
--- a/src/pwgui/main.cpp
+++ b/src/pwgui/main.cpp
@@ -85,6 +85,7 @@ int main(int argc, char *argv[])
// argv[3] is title, get printergui pid from it
if (!helper_getpiduid(argv[2], argv[3])) {
// El cheapo validation failed. Don't enable "smart mode" (GUI etc), just exec real backend
+ fputs("ERROR: Dumb mode - will exec actual backend.\n", stderr);
// Mimic cups behaviour wrt dropping privs (Only 0700 or 0500 == root)
helper_loadlpuser();
struct stat st;
@@ -151,6 +152,7 @@ int main(int argc, char *argv[])
char creds[NAMELEN], *pass = NULL;
snprintf(creds, NAMELEN, "%s", argv[2]);
do {
+ fputs("ERROR: Opening PW dialog....\n", stderr);
int pfd[2];
if (pipe(pfd) != 0) {
helper_error("PrinterGUI", "Konnte pipe für die GUI nicht anlegen.");
@@ -273,7 +275,7 @@ static int run_backend(char *backend, char *uri, char *jobid, char *user, char *
}
status = WEXITSTATUS(status);
if (status != CUPS_BACKEND_OK) fprintf(stderr, "ERROR: Backend returned %d\n", status);
- return WEXITSTATUS(status);
+ return status;
}
static bool helper_getpiduid(char *user, char *title)