Package: irssi-plugin-xmpp / 0.53-1~bpo8+1

singpolyma-0012-Ask-again-for-password-if-wrong.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 56775bd40880cebf0cc9b911d99b184f62e70f21 Mon Sep 17 00:00:00 2001
From: Stephen Paul Weber <singpolyma@singpolyma.net>
Date: Sat, 23 Apr 2011 15:04:40 -0500
Subject: [PATCH 12/18] Ask again for password if wrong

---
 src/core/tools.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/src/core/tools.c
+++ b/src/core/tools.c
@@ -121,7 +121,11 @@
 		strcat(output, buf2);
 	}
 
-	pclose(cstream); /* TODO: check exit code */
+	if(pclose(cstream) == 512) { /* TODO: more check exit code */
+		g_free(pgp_passwd);
+		pgp_passwd = NULL;
+		output = call_gpg(switches, input, input2, get_stderr, snip_data);
+	}
 
 	close(tmp_fd);
 	free(tmp_path);