Re: rs_mdfour functions and librsync >= 0.9.6

Donovan Baarda <[email protected]> Thu, 08 Apr 2004 10:13:05 +1000
Newsgroups gmane.network.librsync.devel
Organization http://minkirri.apana.org.au/~abo/
Message-ID <1081383185.1015.11.camel@schizo>
On Thu, 2004-04-08 at 06:26, Shirish Hemant Phatak wrote:
> Hi,
> 
>     Here is a bug I reported on the Bug tracker on sourceforge a few
> days ago. I am including it here for reference. An change in
> librsync.h has made it impossible to use the buffer oriented
> rs_mdfour_{begin,update,result} functions. The problem is that
> rs_mdfour_t has become an opaque data type, but these functions still
> expect a pre-allocated struct from the caller. This will not affect
> the whole file rs_mdfour_file function.

I did see your original bug report and have been brewing on it for a few
days :-)

I was kind of surprised to see someone was using librsync's md4sum
interface. If all you need is md4sum, then libmd is a much more widely
used library for that purpose.

>     I think rs_mdfour_t can remain anonymous as long as we now have
> rs_mdfour_alloc and res_mdfour_free (analogous to rs_job_xxx)
> functions and require minor changes in the programs to allocate and
> free the rs_mdfour struct.  The other alternative is of course to
> bring back struct rs_mdfour into librsync.h, but given the dependency
> on types.h that might be messy.

One of my plans is to move librsync over to using libmd, or at least the
libmd API. I was thinking that librsync could then clean up the
interface in librsync.h, removing everything except a minimal and clean
interface to librsync itself. Applications could then use libmd for
things like md4sum.

For backwards compatibility we could leave old style rs_mdfour hooks in
librsync.h that just call libmd, but if it's busted right now, I'd
rather drop it than fix it. Now's the time for feedback if you think
this is a bad idea :-)


-- 
Donovan Baarda <[email protected]>
http://minkirri.apana.org.au/~abo/



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click