diff --git a/net/icbirc/Makefile b/net/icbirc/Makefile index 259310a9ccb..4a9230ee9fa 100644 --- a/net/icbirc/Makefile +++ b/net/icbirc/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.9 2007/09/15 22:36:53 merdely Exp $ +# $OpenBSD: Makefile,v 1.10 2009/06/01 07:06:12 ray Exp $ COMMENT= proxy IRC client with ICB server DISTNAME= icbirc-1.8 +PKGNAME= ${DISTNAME}p0 CATEGORIES= net MASTER_SITES= http://www.benzedrine.cx/ diff --git a/net/icbirc/patches/patch-icb_c b/net/icbirc/patches/patch-icb_c new file mode 100644 index 00000000000..42cd588302b --- /dev/null +++ b/net/icbirc/patches/patch-icb_c @@ -0,0 +1,37 @@ +$OpenBSD: patch-icb_c,v 1.1 2009/06/01 07:06:12 ray Exp $ +--- icb.c.orig Thu Nov 18 13:14:06 2004 ++++ icb.c Sat May 30 20:29:23 2009 +@@ -60,6 +60,7 @@ static char icurgroup[256]; + static char igroup[256]; + static char inick[256]; + static char ihostmask[256]; ++static unsigned off; + + /* + * A single ICB packet consists of a length byte, a command byte and +@@ -124,10 +125,24 @@ scan(const char **s, char *d, size_t siz, const char * + } + + void ++icb_init(void) ++{ ++ memset(icb_protolevel, 0, sizeof(icb_protolevel)); ++ memset(icb_hostid, 0, sizeof(icb_hostid)); ++ memset(icb_serverid, 0, sizeof(icb_serverid)); ++ memset(icb_moderator, 0, sizeof(icb_moderator)); ++ imode = imode_none; ++ memset(icurgroup, 0, sizeof(icurgroup)); ++ memset(igroup, 0, sizeof(igroup)); ++ memset(inick, 0, sizeof(inick)); ++ memset(ihostmask, 0, sizeof(ihostmask)); ++ off = 0; ++} ++ ++void + icb_recv(const char *buf, unsigned len, int fd, int server_fd) + { + static unsigned char cmd[256]; +- static unsigned off = 0; + + while (len > 0) { + if (off == 0) { diff --git a/net/icbirc/patches/patch-icb_h b/net/icbirc/patches/patch-icb_h new file mode 100644 index 00000000000..4970fb5fef8 --- /dev/null +++ b/net/icbirc/patches/patch-icb_h @@ -0,0 +1,11 @@ +$OpenBSD: patch-icb_h,v 1.1 2009/06/01 07:06:12 ray Exp $ +--- icb.h.orig Thu Nov 18 13:14:06 2004 ++++ icb.h Sat May 30 20:29:23 2009 +@@ -3,6 +3,7 @@ + #ifndef _ICB_H_ + #define _ICB_H_ + ++void icb_init(void); + void icb_recv(const char *, unsigned, int, int); + void icb_send_login(int, const char *, const char *, const char *); + void icb_send_openmsg(int, const char *); diff --git a/net/icbirc/patches/patch-icbirc_c b/net/icbirc/patches/patch-icbirc_c new file mode 100644 index 00000000000..eb62abfafc3 --- /dev/null +++ b/net/icbirc/patches/patch-icbirc_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-icbirc_c,v 1.1 2009/06/01 07:06:12 ray Exp $ +--- icbirc.c.orig Thu Nov 18 13:14:06 2004 ++++ icbirc.c Sat May 30 20:29:23 2009 +@@ -258,6 +258,7 @@ handle_client(int client_fd) + + irc_send_notice(client_fd, "Connected"); + terminate_client = 0; ++ icb_init(); + while (!terminate_client) { + fd_set readfds; + struct timeval tv;