Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix last problems with streams

  • Loading branch information...
commit dd206b0a8a3d7f1c5aa8617b42bbfa937e2e2df4 1 parent 143e504
@freddy77 freddy77 authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/tds/stream.c
View
4 src/tds/stream.c
@@ -123,7 +123,7 @@ tds_convert_stream(TDSSOCKET * tds, TDSICONV * char_conv, TDS_ICONV_DIRECTION di
if ((size_t) -1 == ol) {
tdsdump_log(TDS_DBG_NETWORK, "Error: tds_convert_stream: tds_iconv returned errno %d, conv_errno %d\n", errno, conv_errno);
- if (conv_errno == E2BIG && ostream->buf_len && bufleft)
+ if (conv_errno == E2BIG && ostream->buf_len && bufleft && len)
goto convert_more;
if (conv_errno != EILSEQ) {
tdsdump_log(TDS_DBG_NETWORK, "Error: tds_convert_stream: "
@@ -137,6 +137,8 @@ tds_convert_stream(TDSSOCKET * tds, TDSICONV * char_conv, TDS_ICONV_DIRECTION di
res = TDS_FAIL;
if (conv_errno == EINVAL && tds)
tdserror(tds_get_ctx(tds), tds, TDSEICONVAVAIL, 0);
+ if (conv_errno == E2BIG && tds)
+ tdserror(tds_get_ctx(tds), tds, TDSEICONVIU, 0);
errno = conv_errno;
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.