View | Details | Raw Unified | Return to bug 82202
Collapse All | Expand All

(-)stunnel/Makefile (-1 / +1 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	stunnel
8
PORTNAME=	stunnel
9
PORTVERSION=	4.10
9
PORTVERSION=	4.10
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	security
11
CATEGORIES=	security
12
MASTER_SITES=	http://www.stunnel.org/download/stunnel/src/ \
12
MASTER_SITES=	http://www.stunnel.org/download/stunnel/src/ \
13
		ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
13
		ftp://stunnel.mirt.net/stunnel/OBSOLETE/ \
(-)stunnel/files/patch-ucontext_src::network.c.diff (+10 lines)
Line 0 Link Here
1
--- src/network.c.orig	Mon Jun 13 18:57:42 2005
2
+++ src/network.c	Mon Jun 13 19:10:55 2005
3
@@ -209,6 +209,7 @@
4
 
5
     /* switch the context */
6
     if(fds) { /* swap the context */
7
+        rewind_ctx_cleanup(ready_head);
8
         swapcontext(&ctx->ctx, &ready_head->ctx);
9
         return ready_head->ready;
10
     } else { /* drop the context */
(-)stunnel/files/patch-ucontext_src::prototypes.h.diff (+10 lines)
Line 0 Link Here
1
--- src/prototypes.h.orig	Mon Jun 13 18:57:23 2005
2
+++ src/prototypes.h	Mon Jun 13 19:09:59 2005
3
@@ -327,6 +327,7 @@
4
 } CONTEXT;
5
 extern CONTEXT *ready_head, *ready_tail;
6
 extern CONTEXT *waiting_head, *waiting_tail;
7
+void rewind_ctx_cleanup(CONTEXT *ctx);
8
 #endif
9
 #ifdef DEBUG_STACK_SIZE
10
 void stack_info(int);
(-)stunnel/files/patch-ucontext_src::sthreads.c.diff (+18 lines)
Line 0 Link Here
1
--- src/sthreads.c.orig	Mon Jun 13 18:57:08 2005
2
+++ src/sthreads.c	Mon Jun 13 19:17:04 2005
3
@@ -66,6 +66,15 @@
4
     s_poll_wait(NULL, 0); /* wait on poll() */
5
 }
6
 
7
+/*
8
+ * Reinitialize cleanup context to make it reusable
9
+ * This is necessary at least on FreeBSD 5.4
10
+ */
11
+void rewind_ctx_cleanup(CONTEXT *ctx) {
12
+    if (ctx->ctx.uc_link == &ctx_cleanup)
13
+        makecontext(&ctx_cleanup, ctx_cleanup_func, 0);
14
+}
15
+
16
 static CONTEXT *new_context(void) {
17
     CONTEXT *ctx;
18
 

Return to bug 82202