You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Colin Higgs <co...@ed.ac.uk> on 2005/04/19 13:16:39 UTC

Bug? perl SVN bindings in win32

This is essentially a re-post, but I got no replies to my last email and 
re-reading it I guess I didn't clearly ask a question.

I think I have found a bug in the perl bindings in the win32 port of 
subversion. The following code works under Linux, but not Windows XP:


######## begin code ########

use warnings;

use Data::Dumper;
use SVN::Client;
$Data::Dumper::Indent = 1;

my $svn = SVN::Client->
    new(
       auth=>
       [SVN::Client::get_ssl_server_trust_prompt_provider(\&callback)]
       );
my $res = $svn->ls("https://somehost/somepath","HEAD",0);

print Dumper($res);

sub callback {
     my ($cred,$realm,$ifailed,$server_cert_info,$may_save) = @_;

     print "Failed with: $ifailed\n";
     $cred->accepted_failures($ifailed);
     print "Leaving callback\n";
}

######## end code ########

The error under Win32 is:

"Type error in argument 2 of 
svn_auth_cred_ssl_server_trust_t_accepted_failures_set. Expected 
_p_apr_uint32_t"

I've also tried things like $SVN::Client::Auth::SSL::UNKNOWNCA inside 
the $cred->accepted_failures call, which results in the sme error.

The subversion version under linux is 1.1.4 (from fedora updates for 
core 3). Under windows I've tried 1.1.3, 1.1.4 and 1.2.0-rc1 (all with 
the same error).

Could this be an incorrect cast in the c glue code? I'm guessing here 
since I've not gone in to the source yet to see how things really work.

In case I do need to hunt around in the source, I'd appreciate any clues 
as to where to look...

Colin.

-- 
Unix is designed to help you avoid doing boring, repetitive things
     - if you can remember how.
Windows makes boring, repetitive things pretty and easy to remember
     - but you still end up doing boring repetitive things.

Colin Higgs,
School of Engineering and Electronics
University of Edinburgh                 Email:  colin.higgs@ed.ac.uk
King's Buildings, Mayfield Road,        Tel:    +44 (0)131 6508557
Edinburgh, Scotland, EH9 3JL            Fax:    +44 (0)131 6506551



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Bug? perl SVN bindings in win32

Posted by Colin Higgs <co...@ed.ac.uk>.
Branko Čibej wrote:

> I think clkao is working on this. 

OK, it would have taken me ages to get up to speed so I could hunt the 
bug. I'll just leave this problem for a while and get on with something 
else - I can get lots of other stuff done before https support needs to 
go in to my script.

> Thanks for the repro script, though, that should help.

No problem - I hope it does (help, that is).

Colin.

-- 
Unix is designed to help you avoid doing boring, repetitive things
     - if you can remember how.
Windows makes boring, repetitive things pretty and easy to remember
     - but you still end up doing boring repetitive things.

Colin Higgs,
School of Engineering and Electronics
University of Edinburgh                 Email:  colin.higgs@ed.ac.uk
King's Buildings, Mayfield Road,        Tel:    +44 (0)131 6508557
Edinburgh, Scotland, EH9 3JL            Fax:    +44 (0)131 6506551



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Bug? perl SVN bindings in win32

Posted by Chia-liang Kao <cl...@clkao.org>.
Branko Čibej <brane <at> xbc.nu> writes:
> > "Type error in argument 2 of 
> > svn_auth_cred_ssl_server_trust_t_accepted_failures_set. Expected 
> > _p_apr_uint32_t"
> 
> I think clkao is working on this. IT looks like SWIG problem, but it's 
> not clear if it's an ommision in our wrappers or a problem with SWIG on 
> Windows in general.

Can you take a closer look?  My generated core.c on freebsd is:
XS(_wrap_svn_auth_cred_ssl_server_trust_t_accepted_failures_set) {
...
        arg2 = (apr_uint32_t) SvUV(ST(1));
        if (arg1) (arg1)->accepted_failures = arg2;
...

While yours seem to have SWIG_ConvertPtr stuff for arg2.  It seems SWIG can't
resolve the apr_uint32_t type to a normal uint.

Cheers,
CLK



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Bug? perl SVN bindings in win32

Posted by Branko Čibej <br...@xbc.nu>.
Colin Higgs wrote:

> The error under Win32 is:
>
> "Type error in argument 2 of 
> svn_auth_cred_ssl_server_trust_t_accepted_failures_set. Expected 
> _p_apr_uint32_t"

I think clkao is working on this. IT looks like SWIG problem, but it's 
not clear if it's an ommision in our wrappers or a problem with SWIG on 
Windows in general.

Thanks for the repro script, though, that should help.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org