[Pkg-privacy-commits] [irssi-plugin-otr] 64/267: More ugly keygen hacking.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:26:17 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 088f164d71fd9b3fa123b0fe2377ef560f8f6215
Author: Uli Meis <a.sporto+bee at gmail.com>
Date: Wed Feb 11 21:39:03 2009 +0100
More ugly keygen hacking.
---
otr_key.c | 1 +
weechat/weechat_otr.h | 21 +++++++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/otr_key.c b/otr_key.c
index 3767f39..543adef 100644
--- a/otr_key.c
+++ b/otr_key.c
@@ -97,6 +97,7 @@ gboolean keygen_complete(GIOChannel *source, GIOCondition condition,
read(g_io_channel_unix_get_fd(kg_st.ch[0]),&err,sizeof(err));
+ g_source_remove(kg_st.cpid);
g_io_channel_shutdown(kg_st.ch[0],FALSE,NULL);
g_io_channel_shutdown(kg_st.ch[1],FALSE,NULL);
g_io_channel_unref(kg_st.ch[0]);
diff --git a/weechat/weechat_otr.h b/weechat/weechat_otr.h
index f5b3f8c..408d257 100644
--- a/weechat/weechat_otr.h
+++ b/weechat/weechat_otr.h
@@ -87,12 +87,29 @@ static void IRCCTX_FREE(IRC_CTX *ircctx)
free(ircctx);
}
+/* Don't look beyond this point. Ugly temporary hack. */
+
#define g_io_add_watch(pid,a,func,b) gioaddwatchfake(pid,func)
-#define g_child_watch_add(pid,func,dunno) NULL
+#define g_child_watch_add(pid,func,dunno) gchildwatchaddfake(pid,dunno)
+#define g_io_channel_shutdown(channel,FALSE,NULL) \
+ close(g_io_channel_unix_get_fd(channel))
+
#define g_source_remove(a) gsourceremovefake(a)
#define guint struct t_hook *
+#include <sys/types.h>
+#include <sys/wait.h>
+
+static void *gchildwatchaddfake(int pid,void *doit) __attribute__ ((unused));
+static void *gchildwatchaddfake(int pid,void *doit)
+{
+ if (doit)
+ waitpid(pid,NULL,0);
+ return NULL;
+
+}
+
static void gsourceremovefake(struct t_hook *hook) __attribute__ ((unused));
static void gsourceremovefake(struct t_hook *hook)
{
@@ -118,5 +135,5 @@ static struct t_hook *gioaddwatchfake(GIOChannel *source, int (*func)(GIOChannel
static struct t_hook *gioaddwatchfake(GIOChannel *source, int (*func)(GIOChannel *source,GIOCondition
condition, gpointer data))
{
- return weechat_hook_fd(g_io_channel_unix_get_fd(source),TRUE,FALSE,FALSE,cb,source);
+ return weechat_hook_fd(g_io_channel_unix_get_fd(source),TRUE,FALSE,FALSE,cb,NULL);
}
--
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