Hello!

I've found a bug in Satellite (CORBA access module for PHP) which prevent from
passing sequences of structures from CORBA servant objects to PHP. I made a
patch for satellite and it seems to be Ok now. (The patch is in the attached
file) I'd appreciate someone reviewing my patch and including it onto PHP
source tree.

-- 
Oleg Sharoiko.
Software and Network Engineer
Computer Center of Rostov State University.
--- php4/ext/satellite/namedvalue_to_zval.c     Sat Sep  2 02:29:00 2000
+++ php-4.0.4pl1/ext/satellite/namedvalue_to_zval.c     Fri Jan 26 11:00:30 2001
@@ -83,7 +83,7 @@
                const CORBA_any * pSource, zval * pDestination)
 {
        int i;
-       int length = 0;
+       int length = 0, step;
        void ** pp_members = NULL;
        zend_bool success = FALSE;
        CORBA_NamedValue source_item;
@@ -121,13 +122,17 @@
        array_init(pDestination);
 #endif
 
+       step = content_type->length ? content_type->length : 1;
+
        for (i = 0; i < length; i++)
        {
                p_destination_item = NULL;
                memset(&source_item, 0, sizeof(CORBA_NamedValue));
 
                source_item.argument._type = content_type;
-               source_item.argument._value = &pp_members[i];
+               source_item.argument._value = pp_members;
+
+               pp_members += step;
 
                ALLOC_ZVAL(p_destination_item);
                
@@ -236,6 +241,7 @@
                }
        }
 
+       return TRUE;
 
 error: 
        return FALSE;
@@ -292,7 +298,7 @@
 
                default:
 /*                     printf("unsupported corba TCKind %i\n", kind);*/
-/*                     php_error(E_WARNING, "unsupported corba TCKind %i", kind);*/
+                       zend_error(E_WARNING, "(satellite) unsupported corba TCKind 
+%i", kind);
        }
 
        return success;
--- php4/ext/satellite/typecode.c       Sat Sep  2 02:29:00 2000
+++ php-4.0.4pl1/ext/satellite/typecode.c       Wed Jan 24 15:28:41 2001
@@ -132,8 +133,7 @@
 
                if (type_code == NULL)
                {
-/*                     printf("unknown type for member %s\n", 
-                                       IDL_IDENT(IDL_LIST(declaration).data).str);*/
+                       zend_error(E_WARNING, "(Satellite) unknown type for member 
+%s", IDL_IDENT(IDL_LIST(declaration).data).str);
                        goto error;
                }
                
-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to