> -----Message d'origine-----
> DeÂ: linux5250-bounces@xxxxxxxxxxxx [mailto:linux5250-
> bounces@xxxxxxxxxxxx] De la part de Scott Klement
> 
> When I run TN5250 with this patch, it crashes immediately after typing my
> userid and password...
> 
> it says "tn5250.exe has encountered a problem and needs to close..."
> "Please tell Microsoft about this problem."
> 
> I don't have time to troubleshoot it at the moment, I'll see if I can
> figure out what's happening later.

It is probably because you need to sync to the HEAD. This is probably this line 
that causes the crash:

> > +   r->enhanced = NULL;

I send you a new patch that simply defines a new function that returns false on 
enhanced query. It replaces the old one. It shouldn't crash anymore.
I though James would have changed terminal.c to support NULL enhanced function 
pointer but I have been a bit too fast. :)

Check if your HEAD branch still works (without my patch). It shouldn't. :)

M-A

----- CUT -----
Index: win32/tn5250-win.c
===================================================================
RCS file: /cvsroot/tn5250/tn5250/win32/tn5250-win.c,v
retrieving revision 1.10
diff -u -r1.10 tn5250-win.c
--- win32/tn5250-win.c  6 Aug 2002 22:09:17 -0000       1.10
+++ win32/tn5250-win.c  24 Feb 2005 15:39:42 -0000
@@ -200,8 +200,9 @@
            tn5250_terminal_term(term);
      if (sess != NULL)
            tn5250_session_destroy(sess);
-     if (stream != NULL)
-           tn5250_stream_destroy(stream);
+     /* The stream as already been destroyed in tn5250_session_destroy()
+      * if (stream != NULL)
+      *      tn5250_stream_destroy(stream); */
      if (config != NULL)
            tn5250_config_unref (config);
  
Index: win32/winterm.c
===================================================================
RCS file: /cvsroot/tn5250/tn5250/win32/winterm.c,v
retrieving revision 1.22
diff -u -r1.22 winterm.c
--- win32/winterm.c     29 Mar 2004 21:45:19 -0000      1.22
+++ win32/winterm.c     24 Feb 2005 21:21:13 -0000
@@ -341,7 +341,20 @@
 };
 
 
-
+/****f* lib5250/tn5250_win32_terminal_new
+ * NAME
+ *    tn5250_win32_terminal_enhanced
+ * SYNOPSIS
+ *    ret = tn5250_win32_terminal_enhanced (This);
+ * INPUTS
+ *    None
+ * DESCRIPTION
+ *    Disallow support of the enhanced protocol
+ *****/
+static int tn5250_win32_terminal_enhanced(Tn5250Terminal * This)
+{
+    return 0;
+}
 
 /****f* lib5250/tn5250_win32_terminal_new
  * NAME
@@ -417,8 +430,11 @@
    r->getkey = win32_terminal_getkey;
    r->beep = win32_terminal_beep;
    r->config = win32_terminal_set_config;
-
-
+   r->enhanced = tn5250_win32_terminal_enhanced;
+   r->create_window = NULL;
+   r->destroy_window = NULL;
+   r->create_scrollbar = NULL;
+   r->destroy_scrollbar = NULL;
    return r;
 }
 
@@ -1956,7 +1972,9 @@
            return 0;
   
         case WM_KILLFOCUS:
+           hdc = GetDC(hwnd);
            win32_hide_caret(hdc, globTerm);
+           ReleaseDC(hwnd, hdc);
            globTerm->data->is_focused = 0;
            return 0;
 ----- CUT -----




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.