Author: dick
Date: 2005-04-26 09:47:44 -0400 (Tue, 26 Apr 2005)
New Revision: 43595

Modified:
   trunk/mono/mono/io-layer/ChangeLog
   trunk/mono/mono/io-layer/handles.c
Log:

2005-04-26  Dick Porter  <[EMAIL PROTECTED]>

        * handles.c: Fix stupid thinko where if a new shared handle is
        created but a collection was needed to free some space, it
        returned an error anyway.  Should fix the messages shown in bug
        74659.




Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog  2005-04-26 13:45:27 UTC (rev 43594)
+++ trunk/mono/mono/io-layer/ChangeLog  2005-04-26 13:47:44 UTC (rev 43595)
@@ -1,3 +1,10 @@
+2005-04-26  Dick Porter  <[EMAIL PROTECTED]>
+
+       * handles.c: Fix stupid thinko where if a new shared handle is
+       created but a collection was needed to free some space, it
+       returned an error anyway.  Should fix the messages shown in bug
+       74659.
+
 2005-04-25  Dick Porter  <[EMAIL PROTECTED]>
 
        * handles.c (_wapi_handle_check_share): Only consider mono

Modified: trunk/mono/mono/io-layer/handles.c
===================================================================
--- trunk/mono/mono/io-layer/handles.c  2005-04-26 13:45:27 UTC (rev 43594)
+++ trunk/mono/mono/io-layer/handles.c  2005-04-26 13:47:44 UTC (rev 43595)
@@ -370,16 +370,21 @@
                        _wapi_handle_collect ();
                        offset = _wapi_handle_new_shared (type,
                                                          handle_specific);
-                       /* FIXME: grow the arrays */
-                       return (_WAPI_HANDLE_INVALID);
+                       if (offset == 0) {
+                               /* FIXME: grow the arrays */
+                               return (_WAPI_HANDLE_INVALID);
+                       }
                }
                
                ref = _wapi_handle_new_shared_offset (offset);
                if (ref == 0) {
                        _wapi_handle_collect ();
                        ref = _wapi_handle_new_shared_offset (offset);
-                       /* FIXME: grow the arrays */
-                       return (_WAPI_HANDLE_INVALID);
+
+                       if (ref == 0) {
+                               /* FIXME: grow the arrays */
+                               return (_WAPI_HANDLE_INVALID);
+                       }
                }
                
                _WAPI_PRIVATE_HANDLES(handle_idx).u.shared.offset = ref;
@@ -682,8 +687,11 @@
                        _wapi_handle_collect ();
                        new_off = _wapi_handle_new_shared (type, 
                                                           handle_specific);
-                       /* FIXME: grow the arrays */
-                       return (FALSE);
+
+                       if (new_off == 0) {
+                               /* FIXME: grow the arrays */
+                               return (FALSE);
+                       }
                }
                
                shared_handle_data = &_wapi_shared_layout->handles[new_off];

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to