[Pkg-privacy-commits] [irssi-plugin-otr] 252/267: Fix: otr info printing every user fingerprints

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.

commit 34d20723e0927bc1f2359b93cac5512fe727215c
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Thu Sep 5 20:12:27 2013 -0400

    Fix: otr info printing every user fingerprints
    
    The /otr info command was using the wrong data structure to print the
    available user keys.
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/cmd.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/cmd.c b/src/cmd.c
index 27833d3..6b5aa70 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -346,17 +346,16 @@ static void _cmd_info(struct otr_user_state *ustate, SERVER_REC *irssi,
 {
 	unsigned int fp_found = 0;
 	char ownfp[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
-	ConnContext *ctx;
-
-	for (ctx = ustate->otr_state->context_root; ctx != NULL; ctx = ctx->next) {
-		if (ctx == ctx->m_context) {
-			otrl_privkey_fingerprint(user_state_global->otr_state, ownfp,
-					ctx->accountname, OTR_PROTOCOL_ID);
-			IRSSI_NOTICE(irssi, target, "%B%s%n fingerprint:",
-					ctx->accountname, ownfp);
-			IRSSI_NOTICE(irssi, target, "%g%s%n", ownfp);
-			fp_found = 1;
-		}
+	OtrlPrivKey *key;
+
+	for (key = user_state_global->otr_state->privkey_root; key != NULL;
+			key = key->next) {
+		otrl_privkey_fingerprint(user_state_global->otr_state, ownfp,
+				key->accountname, OTR_PROTOCOL_ID);
+		IRSSI_NOTICE(irssi, target, "%B%s%n fingerprint:",
+				key->accountname, ownfp);
+		IRSSI_NOTICE(irssi, target, "%g%s%n", ownfp);
+		fp_found = 1;
 	}
 
 	if (!fp_found) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git



More information about the Pkg-privacy-commits mailing list