Park Heesob
9/5/2003 3:56:00 AM
Hi,
----- Original Message -----
From: "Berger, Daniel" <djberge@qwest.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Friday, September 05, 2003 6:19 AM
Subject: [ANN] sys-win32etc 0.0.4
...
> HELP WANTED
> ============
> Testing is much appreciated, especially for the optional server name.
>
> Contrary to what I said in the docs, there is still one remaining issue.
> For reasons I cannot determine, the current code results in a segfault
when
> run in conjunction with TestUnit (at least, it does on my WinXP Pro box).
> However, the vanilla test script (test.rb) works fine. Help on this
> peculiarity is definitely wanted.
>
I think It''s due to invalid struct allocation method.
Try following patch.
===============================================================
@@ -103,8 +103,10 @@
// This portion of code taken partially from a post by Shashank Date.
// Also, the server name is automatically prepended to the server name
// strictly for convenience.
+ wchar_t wszTemp[MAX_PATH];
+ gstruct = rb_struct_new(GroupStruct);
if(tserver != Qnil){
- wchar_t wszTemp[MAX_PATH];
+
VALUE server = rb_str_new2("\\\\");
rb_str_concat(server,tserver);
mbstowcs(wszTemp, STR2CSTR(server), MAX_PATH);
@@ -309,9 +311,11 @@
VALUE r_auth_flags = rb_ary_new();
VALUE uid = Qnil;
+ wchar_t wszTemp[MAX_PATH];
+ pstruct = rb_struct_new(PasswdStruct);
if(tserver != Qnil){
- wchar_t wszTemp[MAX_PATH];
+
VALUE server = rb_str_new2("\\\\");
rb_str_concat(server,tserver);
================================================================
Regards,
Park Heesob