Skip Menu |

This queue is for tickets about the SAP-Rfc CPAN distribution.

Report information
The Basics
Id: 71776
Status: new
Priority: 0/
Queue: SAP-Rfc

People
Owner: Nobody in particular
Requestors: xrgtn [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.55
Fixed in: (no value)



Subject: error text for Unicode $rfc->discover(...) is garbage
Hello, If there are errors during Unicode-mode $rfc->discover(...) call, the $rfc->error() and $rfc->errorKeys() return garbage instead of actual error text. Patch for Rfc.xs is attached. -- WBR, xrgtn
Subject: croak_u16to8.patch
--- Rfc.xs.orig 2007-03-09 09:41:24.000000000 +0200 +++ Rfc.xs 2011-10-19 10:52:25.000000000 +0300 @@ -1002,7 +1002,7 @@ SV* MyGetStructure(SV* sv_handle, SV* sv sprintfU(errstr, cU("EXCEPT\t%s\tGROUP\t%d\tKEY\t%s\tMESSAGE\t%s"),cU("RfcGetStructureInfoAsTable"), error_info.group, error_info.key, error_info.message); }; //fprintfU(stderr,cU("%s"), errstr); - croak("%s", u16to8((char *) errstr, strlenU(errstr)*2)); + croak("%s", SvPV_nolen(u16to8((char *) errstr, strlenU(errstr)*2))); //exit(-1); }; @@ -1461,7 +1461,7 @@ SV* MySysinfo(SV* sv_handle){ }; //fprintfU(stderr,cU("%s"), errstr); #ifdef SAPwithUNICODE - croak("%s", u16to8((char *) errstr, strlenU(errstr)*2)); + croak("%s", SvPV_nolen(u16to8((char *) errstr, strlenU(errstr)*2))); #else croak("%s", errstr); #endif @@ -1535,7 +1535,7 @@ SV* MyGetInterface(SV* sv_handle, SV* sv }; //fprintfU(stderr,cU("%s"), errstr); #ifdef SAPwithUNICODE - croak("%s", u16to8((char *) errstr, strlenU(errstr)*2)); + croak("%s", SvPV_nolen(u16to8((char *) errstr, strlenU(errstr)*2))); #else croak("%s", errstr); #endif