Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 33801 Details for
Bug 40521
Qmail: use of recordio breaks SSL connection attempts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Maybe this patch I found somewhere in the net fix the problema
fixcrio-tls.patch (text/plain), 2.59 KB, created by
Abner Graham Jacobsen
on 2004-06-21 20:41:18 UTC
(
hide
)
Description:
Maybe this patch I found somewhere in the net fix the problema
Filename:
MIME Type:
Creator:
Abner Graham Jacobsen
Created:
2004-06-21 20:41:18 UTC
Size:
2.59 KB
patch
obsolete
>--- fixcrio.c-dist Fri Dec 6 22:40:37 2002 >+++ fixcrio.c Fri Dec 6 22:55:27 2002 >@@ -16,20 +16,28 @@ > int leftlen; > int leftpos; > int leftflagcr = 0; > > int rightstatus = 0; > char rightbuf[512]; > int rightlen; > int rightpos; > int rightflagcr = 0; > >+#define NULL ((void *)0) >+int active = 1; >+int gotleft_tls = 0; >+static char left_tls[] = "STARTTLS"; >+static char right_tls[] = "220"; >+static char *left_p = NULL; >+static char *right_p = NULL; >+ > void doit(int fdleft,int fdright) > { > struct taia stamp; > struct taia deadline; > iopause_fd x[4]; > int xlen; > iopause_fd *io0; > iopause_fd *ioleft; > iopause_fd *io1; > iopause_fd *ioright; >@@ -76,23 +84,34 @@ > if (r <= 0) { > leftstatus = -1; > close(fdleft); > } > else { > leftstatus = 1; > leftpos = 0; > leftlen = 0; > for (i = 0;i < r;++i) { > ch = prebuf[i]; >- if (ch == '\n') >- if (!leftflagcr) >- leftbuf[leftlen++] = '\r'; >+ if (active) >+ if (ch == '\n') { >+ if (!leftflagcr) >+ leftbuf[leftlen++] = '\r'; >+ gotleft_tls = (left_p != NULL && *left_p == 0); >+ if (gotleft_tls) >+ right_p = right_tls; >+ left_p = left_tls; >+ } else if (left_p != NULL && *left_p != 0) { >+ if (ch == *left_p) >+ left_p++; >+ else >+ left_p = NULL; >+ } > leftbuf[leftlen++] = ch; > leftflagcr = (ch == '\r'); > } > } > } > > if (ioleft && ioleft->revents) { > r = write(fdleft,leftbuf + leftpos,leftlen - leftpos); > if (r == -1) break; > leftpos += r; >@@ -100,23 +119,32 @@ > } > > if (ioright && ioright->revents) { > r = read(fdright,prebuf,sizeof prebuf); > if (r <= 0) break; > rightstatus = 1; > rightpos = 0; > rightlen = 0; > for (i = 0;i < r;++i) { > ch = prebuf[i]; >- if (ch == '\n') >- if (!rightflagcr) >- rightbuf[rightlen++] = '\r'; >+ if (active) >+ if (ch == '\n') { >+ if (!rightflagcr) >+ rightbuf[rightlen++] = '\r'; >+ active = !(right_p != NULL && *right_p == 0); >+ right_p = NULL; >+ } else if (right_p != NULL && *right_p != 0) { >+ if (ch == *right_p) >+ right_p++; >+ else >+ right_p = NULL; >+ } > rightbuf[rightlen++] = ch; > rightflagcr = (ch == '\r'); > } > } > > if (io1 && io1->revents) { > r = write(1,rightbuf + rightpos,rightlen - rightpos); > if (r == -1) break; > rightpos += r; > if (rightpos == rightlen) rightstatus = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 40521
:
25089
|
25090
|
25091
| 33801 |
42047