patches to merge string and charset code
Andrew Bartlett
abartlet at samba.org
Tue Apr 12 01:49:26 MDT 2011
Tridge,
I've spent a fair bit of my day today working on a patch series to merge
significant parts of our string code.
It is in
http://git.samba.org/?p=abartlet/samba.git/.git;a=shortlog;h=refs/heads/merge-str
I've broken it up into little bits, so there are a *lot* of patches, but
the most interesting is the last one, which tries to merge the
convert_string() implementations:
http://git.samba.org/?p=abartlet/samba.git/.git;a=commitdiff;h=799a928b8bf6e928412d0755a1a4b6764dbbe48b
This is interesting because the tests I've written show that the two
implementations have different termination semantics - the source3
implementation will return a NULL terminator in the converted_size, even
part-way though a failed string conversion.
I also see some other things that look like errors (not unexpected in a
codebase of this complexity that hasn't been unit tested before).
I've tried to cover most of the angles around the charset and character
handling code, but we can certainly test more and different combinations
if anyone cares to suggest them.
In the easier to deal with department, I've found a significant number
of unused '_w' functions (that deal with smb_ucs2_t types). This should
allay your concerns about introducing this type to the common code. I
don't think it's practical to completely remove these from the tree
right now, and would like to be able to get some of the merge in before
we finish that task.
I may also find other issues once it's been past a s3 and s4 test, but I
wanted you and the list to see the patch set, as it's grown rather
larger than I expected.
Thanks,
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical
mailing list