[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r36747 - trunk/subversion/libsvn_subr

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Tue, 24 Mar 2009 22:35:49 +0100

> -----Original Message-----
> From: Ivan Zhakov [mailto:chemodax_at_gmail.com]
> Sent: Monday, March 23, 2009 8:25 PM
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r36747 - trunk/subversion/libsvn_subr
>
> Author: zhakov
> Date: Mon Mar 23 12:24:54 2009
> New Revision: 36747
>
> Log:
> * subversion/libsvn_subr/subst.c:
> (svn_subst_translate_cstring2): Close the destination stream to flush
> unwritten data.
>
> Modified:
> trunk/subversion/libsvn_subr/subst.c
>
> Modified: trunk/subversion/libsvn_subr/subst.c
> URL:
> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/subst.c?p
> athrev=36747&r1=36746&r2=36747
> =======================================================================
> =======
> --- trunk/subversion/libsvn_subr/subst.c Mon Mar 23 04:11:03 2009
> (r36746)
> +++ trunk/subversion/libsvn_subr/subst.c Mon Mar 23 12:24:54 2009
> (r36747)
> @@ -1241,6 +1241,9 @@ svn_subst_translate_cstring2(const char
> /* Jam the text into the destination stream (to translate it). */
> SVN_ERR(svn_stream_write(dst_stream, src, &len));
>
> + /* Close the destination stream to flush unwritten data. */
> + SVN_ERR(svn_stream_close(dst_stream));
> +
> *dst = dst_stringbuf->data;
> return SVN_NO_ERROR;
> }

        Hi,

How could this cause unflushed data?

If I look at svn_stream_from_stringbuf() it doesn't define an explicit close
function, so the svn_stream_close() will be a no-op.

(write_handler_stringbuf in stream.c directly adds all data into the string
buffer; there is no extra buffer layer)

        Bert

>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageI
> d=1391896

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1406299
Received on 2009-03-24 22:36:13 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.