On 01/07/2011 11:33 AM, cmpilato_at_apache.org wrote:
> Author: cmpilato
> Date: Fri Jan 7 19:33:28 2011
> New Revision: 1056468
>
> URL: http://svn.apache.org/viewvc?rev=1056468&view=rev
> Log:
> Clean up an old bit of API nastiness which prevented implementations
> of the svn_fs_get_locks_callback_t callback from performing additional
> FS operations in BDB-backed repositories. Having svn_fs_get_locks2()
> already revved for 1.7 makes this a good time to fix this old bug.
> + SVN_ERR(svn_io_open_uniquely_named(&(args.spool_file), NULL, NULL, NULL,
> + NULL, svn_io_file_del_on_close,
> + pool, pool));
> + SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_get_locks,&args, FALSE, pool));
> +
> + /* Rewind the spool file, then re-read it, calling GET_LOCKS_FUNC(). */
> + svn_io_file_seek(args.spool_file, APR_SET,&offset, pool);
Need to handle the error here?
> + /* Read the extra newline that follows the skel. */
> + len = 1;
> + SVN_ERR(svn_stream_read(stream,&c,&len));
> + if (c != '\n')
> + return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
> +
> + /* Parse the skel into a lock, and notify the caller. */
> + lock_skel = svn_skel__parse(skel_buf, skel_len, iterpool);
> + SVN_ERR(svn_fs_base__parse_lock_skel(&lock, lock_skel, iterpool));
> + get_locks_func(get_locks_baton, lock, iterpool);
And here too, since svn_fs_get_locks_callback_t has an svn_error_t *
return type.
Blair
Received on 2011-01-07 20:56:23 CET