Skip to Content.
Sympa Menu

freetds - RE: [freetds] patch 20031120

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] patch 20031120
  • Date: Thu, 20 Nov 2003 17:28:52 +0100

> >
> > However I changed tds_iconv prototype and some behaviour.
> io parameter
> > was replaced with a flags parameter that specify direction,
> previous
> > error and chunking behaviour. tds_iconv return a set of errors, not
> > only a single error.
> > Onestly I don't like that much the change (perhaps it's
> best to add a
> > int* flags parameter??)... however it works.
>
> Ugh, I don't like it either. I'll review your mail in case
> you told me already, but I don't understand why tds_iconv
> should care about incomplete end-of-buffer sequences. It
> should return normally, leaving errno set to EILSEQ, and let
> the caller determine if that's an error warranting a user
> message or not.
>

In chunked conversions every single chunk can raise EILSEQ so I return
error that tds_iconv had and I pass them back to next tds_iconv so
tds_iconv know if it has already sent a message. Also in chunk
conversions tds_iconv do not send a message on EINVAL.

> Please, let's not overload TDS_ICONV_DIRECTION. We can bury
> a flag in TDSSOCKET or TDSICONVINFO if need be.
>

It's better in TDSICONVINFO but caller should send a "this is the first
chunk" flag... perhaps this can be a better solution... add a field to
TDSICONV to store old errors and caller should say if this is the first
and/or the last chunk (in no-chunk conversions it's always the first and
the last chunk). So you can also reset iconv state (iconv(cd, NULL,
NULL, NULL, NULL) )... Does this sound reasonable ?

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page