rs_mdfour functions and librsync >= 0.9.6

Shirish Hemant Phatak <[email protected]> Wed, 07 Apr 2004 16:28:01 -0400
Newsgroups gmane.network.librsync.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------010408000409010408020809
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


Hi,

    Here is an issue 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 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 a little messy.

-Shirish


    rs_mdfour family can't be used with librsync >= 0.9.6?

    It appears that rs_mdfour family of functions has
    trouble in 0.9.6 because "struct rs_mdfour" is no
    longer defined. Further, it appears that
    rs_mdfour_begin still expects a pre-allocated buffer to
    be passed in, so this can't be an anonymous type (we
    need to allocate storage from the caller). librsync
    0.9.5 defined struct rs_mdfour in rsync.h. This
    definition has now been moved into mdfour.h, which
    further depends on types.h.

    None of these problems will surface if you only use the
    whole file API: rs_mdfour_file. Unfortunately a bunch
    of other stuff that uses buffer APIs:
    rs_mdfour_{begin,update,result} will break.


--------------010408000409010408020809
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
Hi,<br>
<br>
&nbsp;&nbsp;&nbsp; Here is an issue 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.<br>
<br>
&nbsp;&nbsp;&nbsp; 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.&nbsp; 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 a little messy.<br>
<br>
-Shirish<br>
<br>
<br>
<blockquote>rs_mdfour family can't be used with librsync &gt;= 0.9.6?
  <form method="post" action="/tracker/index.php"></form>
It appears that rs_mdfour family of functions has<br>
trouble in 0.9.6 because "struct rs_mdfour" is no<br>
longer defined. Further, it appears that<br>
rs_mdfour_begin still expects a pre-allocated buffer to<br>
be passed in, so this can't be an anonymous type (we<br>
need to allocate storage from the caller). librsync<br>
0.9.5 defined struct rs_mdfour in rsync.h. This<br>
definition has now been moved into mdfour.h, which<br>
further depends on types.h.<br>
  <br>
None of these problems will surface if you only use the<br>
whole file API: rs_mdfour_file. Unfortunately a bunch<br>
of other stuff that uses buffer APIs:<br>
rs_mdfour_{begin,update,result} will break.<br>
</blockquote>
</body>
</html>

--------------010408000409010408020809--




-------------------------------------------------------
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