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

Re: boolean issue with serf

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 16 Apr 2009 21:39:18 +0200

On Thu, Apr 16, 2009 at 21:30, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
> Hi,
>
> A user reported a strange problem that happens only with TSVN and serf,
> but not with the CL client.
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=1752435
>
> After some testing I found that TSVN passes a value of 32 as 'true' to
> svn_client_lock for the --force flag. This works ok when using neon, but
> fails when using serf. If I pass 1 instead of 32 then serf works too.
>
> Now while I can fix this easily in TSVN, I'm wondering if it's really
> required to pass 1 as svn_boolean_t values? Shouldn't all comparisons be
> done as !=0 instead of == 1 in C since it doesn't have a bool type?
>
> I haven't stepped through the serf code to find out where the comparison
> is that fails if I pass 32 as 'TRUE' though...

A quick search through the files revealed:

libsvn_ra_serf\locks.c, line 720 (1.6.x branch), function svn_ra_serf__unlock():
      if (force == TRUE && (!token || token[0] == '\0'))

libsvn_ra_serf\locks.c, line 329(1.6.x branch), function set_lock_headers():
  if (lock_ctx->force == TRUE)

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1753705
Received on 2009-04-16 21:40:24 CEST

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.