The Samba-Bugzilla – Attachment 2963 Details for
Bug 5075
Syncing with --iconv may yield protocol error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Diffs to fix bug
io.c.diff (text/plain), 2.56 KB, created by
Lennart Lövstrand
on 2007-11-12 00:14:19 UTC
(
hide
)
Description:
Diffs to fix bug
Filename:
MIME Type:
Creator:
Lennart Lövstrand
Created:
2007-11-12 00:14:19 UTC
Size:
2.56 KB
patch
obsolete
>*** io.c~ Sat Nov 3 00:20:05 2007 >--- io.c Sun Nov 11 21:59:57 2007 >*************** >*** 468,485 **** > char buffer[BIGPATHBUFLEN]; /* Oversized for use by iconv code. */ > size_t n = len; > >- SIVAL(buffer, 0, ((MPLEX_BASE + (int)code)<<24) + len); >- > #ifdef ICONV_OPTION > if (convert && ic_send == (iconv_t)-1) > #endif > convert = 0; > >! if (convert || n > 1024 - 4) /* BIGPATHBUFLEN can handle 1024 bytes */ > n = 0; > else > memcpy(buffer + 4, buf, n); > > defer_forwarding_keep = 1; /* defer_forwarding_messages++ on return */ > writefd_unbuffered(fd, buffer, n+4); > defer_forwarding_keep = 0; >--- 468,508 ---- > char buffer[BIGPATHBUFLEN]; /* Oversized for use by iconv code. */ > size_t n = len; > > #ifdef ICONV_OPTION > if (convert && ic_send == (iconv_t)-1) > #endif > convert = 0; > >! #ifdef ICONV_OPTION >! /* We need to convert buf before doing anything else so that we >! * can include the (converted) byte length in the message header. >! */ >! if (convert) { >! xbuf outbuf, inbuf; >! >! INIT_XBUF(outbuf, buffer + 4, 0, sizeof(buffer) - 4); >! INIT_XBUF(inbuf, (char*)buf, len, -1); >! >! iconvbufs(ic_send, &inbuf, &outbuf, >! ICB_INCLUDE_BAD | ICB_INCLUDE_INCOMPLETE); >! >! if (inbuf.len > 0) { >! rprintf(FERROR, "conversion buffer overflow in mplex_write; " >! "either enlarge 'buffer' or rewrite code to allocate " >! "buffer dynamically"); >! } >! >! n = len = outbuf.len; >! } else >! #endif >! if (n > sizeof(buffer) - 4) > n = 0; > else > memcpy(buffer + 4, buf, n); > >+ SIVAL(buffer, 0, ((MPLEX_BASE + (int)code)<<24) + len); >+ >+ > defer_forwarding_keep = 1; /* defer_forwarding_messages++ on return */ > writefd_unbuffered(fd, buffer, n+4); > defer_forwarding_keep = 0; >*************** >*** 487,506 **** > len -= n; > buf += n; > >- #ifdef ICONV_OPTION >- if (convert) { >- xbuf outbuf, inbuf; >- >- INIT_CONST_XBUF(outbuf, buffer); >- INIT_XBUF(inbuf, (char*)buf, len, -1); >- >- do { >- iconvbufs(ic_send, &inbuf, &outbuf, >- ICB_INCLUDE_BAD | ICB_INCLUDE_INCOMPLETE); >- writefd_unbuffered(fd, outbuf.buf, outbuf.len); >- } while (inbuf.len); >- } else >- #endif > if (len) > writefd_unbuffered(fd, buf, len); > >--- 510,515 ---- >*************** >*** 1060,1066 **** > int pos = 0; > > INIT_CONST_XBUF(outbuf, line); >! inbuf.buf = ibuf; > > while (msg_bytes) { > inbuf.len = msg_bytes > sizeof ibuf >--- 1069,1075 ---- > int pos = 0; > > INIT_CONST_XBUF(outbuf, line); >! INIT_XBUF(inbuf, ibuf, 0, -1); > > while (msg_bytes) { > inbuf.len = msg_bytes > sizeof ibuf
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 Raw
Actions:
View
Attachments on
bug 5075
: 2963