summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
Diffstat (limited to 'php/src')
-rw-r--r--php/src/ice/proxy.cpp60
1 files changed, 33 insertions, 27 deletions
diff --git a/php/src/ice/proxy.cpp b/php/src/ice/proxy.cpp
index d1ae9d96bd3..6965deef1c9 100644
--- a/php/src/ice/proxy.cpp
+++ b/php/src/ice/proxy.cpp
@@ -1259,48 +1259,54 @@ IcePHP::Operation::invoke(INTERNAL_FUNCTION_PARAMETERS)
bool status = _proxy->ice_invoke(_op->name(), mode, os.b, is.b, ctx);
//
- // Reset the input stream's iterator.
+ // Process the reply.
//
- is.i = is.b.begin();
-
- if(status)
+ if(_proxy->ice_isTwoway())
{
//
- // Unmarshal the results.
- //
- // TODO: Check for oneway/datagram errors
+ // Reset the input stream's iterator.
//
- for(i = _inParams.size(), p = _outParams.begin(); p != _outParams.end(); ++i, ++p)
+ is.i = is.b.begin();
+
+ if(status)
{
//
- // We must explicitly destroy the existing contents of all zvals passed
- // as out parameters, otherwise leaks occur.
+ // Unmarshal the results.
//
- zval_dtor(*args[i]);
- if(!(*p)->unmarshal(*args[i], is TSRMLS_CC))
+ // TODO: Check for oneway/datagram errors
+ //
+ for(i = _inParams.size(), p = _outParams.begin(); p != _outParams.end(); ++i, ++p)
{
- return;
+ //
+ // We must explicitly destroy the existing contents of all zvals passed
+ // as out parameters, otherwise leaks occur.
+ //
+ zval_dtor(*args[i]);
+ if(!(*p)->unmarshal(*args[i], is TSRMLS_CC))
+ {
+ return;
+ }
}
- }
- if(_result)
- {
- if(!_result->unmarshal(return_value, is TSRMLS_CC))
+ if(_result)
{
- return;
+ if(!_result->unmarshal(return_value, is TSRMLS_CC))
+ {
+ return;
+ }
+ }
+ if(_op->returnsClasses())
+ {
+ is.readPendingObjects();
}
}
- if(_op->returnsClasses())
+ else
{
- is.readPendingObjects();
+ //
+ // Unmarshal and "throw" a user exception.
+ //
+ throwUserException(is TSRMLS_CC);
}
}
- else
- {
- //
- // Unmarshal and "throw" a user exception.
- //
- throwUserException(is TSRMLS_CC);
- }
}
catch(const IceUtil::Exception& ex)
{