[Pkg-privacy-commits] [irssi-plugin-otr] 46/267: Increment refcount on irssi SERVER_REC. Fixes bug on /quit.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:41:27 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 23b5547be77409ef134d61701ee0bc303844d2f9
Author: Uli Meis <a.sporto+bee at gmail.com>
Date:   Mon Feb 2 16:53:10 2009 +0100

    Increment refcount on irssi SERVER_REC. Fixes bug on /quit.
    
    Thanks to quantax for finding this!
---
 irssi_otr.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/irssi_otr.h b/irssi_otr.h
index 53a64d1..3769284 100644
--- a/irssi_otr.h
+++ b/irssi_otr.h
@@ -15,11 +15,23 @@
 
 #define IRC_CTX SERVER_REC
 
-/* no need for duplication */
-#define IRCCTX_DUP(ircctx) ircctx
+static IRC_CTX *IRCCTX_DUP(IRC_CTX *ircctx) __attribute__ ((unused));
+
+static IRC_CTX *IRCCTX_DUP(IRC_CTX *ircctx) {
+	server_ref(ircctx);
+	return ircctx;
+}
+
+static IRC_CTX *IRCCTX_FREE(IRC_CTX *ircctx) __attribute__ ((unused));
+
+static IRC_CTX *IRCCTX_FREE(IRC_CTX *ircctx)
+{
+	server_unref(ircctx);
+	return ircctx;
+}
+
 #define IRCCTX_ADDR(ircctx) ircctx->connrec->address
 #define IRCCTX_NICK(ircctx) ircctx->nick
-#define IRCCTX_FREE(ircctx) ;
 
 #define otr_noticest(formatnum,...) \
 	printformat(NULL,NULL,MSGLEVEL_MSGS, formatnum, ## __VA_ARGS__)

-- 
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