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

Re: [PATCH] Allow custom user agent string

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2007-12-09 11:56:31 CET

On Dec 9, 2007 2:42 AM, Stefan Küng <tortoisesvn@gmail.com> wrote:
> Well, I used the same approach as svn_wc_set_adm_dir() : that function
> doesn't really need a pool argument either. IIRC, the discussion back
> then was that all functions should take a pool argument, even if not
> currently used so it can be extended more easily in the future.

Well, used in the manner of this patch, a pool would be unsafe.

> AFAIK, there are not that many requests done for an operation. Which
> means it shouldn't be a big problem?

No - it is a big problem. There's at least 2x-per-file HTTP requests
on an update (GET & PROPFIND).

So, yah, that can be a lot of requests - so allocating from the
session pool is badness - especially when we're dealing with a string
that shouldn't change after initialization (based on the docstring).

> attached is a corrected patch: the first one forgot to add the '0'
> argument for apr_pstrcat as the last argument and therefore would
> randomly crash in release builds.

Please use NULL instead of 0. -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 9 11:56:41 2007

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.