mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 02:30:53 +00:00
([Connection -forwardForProxy:selector:argFrame:]): In nested function
decoder(), always set IP to -1 after sending it -dismiss, i.e. in both cases. Fix the assertion at the bottom so that IP is allowed to be nil, which will be the case when mframe_build_return() never calls decoder(), which will happen when we are returning void. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2220 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
edfbd1df97
commit
06040ad95f
1 changed files with 8 additions and 3 deletions
|
@ -592,7 +592,7 @@ static int messages_received_count;
|
||||||
if (ip) {
|
if (ip) {
|
||||||
/* this must be here to avoid trashing alloca'ed retframe */
|
/* this must be here to avoid trashing alloca'ed retframe */
|
||||||
[ip dismiss];
|
[ip dismiss];
|
||||||
ip = nil;
|
ip = (id)-1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -614,6 +614,7 @@ static int messages_received_count;
|
||||||
[ip decodeObjectAt: &exc
|
[ip decodeObjectAt: &exc
|
||||||
withName: NULL];
|
withName: NULL];
|
||||||
[ip dismiss];
|
[ip dismiss];
|
||||||
|
ip = (id)-1;
|
||||||
/* xxx Is there anything else to clean up in
|
/* xxx Is there anything else to clean up in
|
||||||
dissect_method_return()? */
|
dissect_method_return()? */
|
||||||
[exc raise];
|
[exc raise];
|
||||||
|
@ -630,8 +631,12 @@ static int messages_received_count;
|
||||||
|
|
||||||
retframe = mframe_build_return (argframe, type, out_parameters,
|
retframe = mframe_build_return (argframe, type, out_parameters,
|
||||||
decoder);
|
decoder);
|
||||||
/* Make sure we processed all arguments, and dismissed the IP. */
|
/* Make sure we processed all arguments, and dismissed the IP.
|
||||||
assert (ip == (id)-1);
|
IP is always set to -1 after being dismissed; the only places
|
||||||
|
this is done is in this function DECODER(). IP will be nil
|
||||||
|
if mframe_build_return() never called DECODER(), i.e. when
|
||||||
|
we are just returning (void).*/
|
||||||
|
assert (ip == (id)-1 || ip == nil);
|
||||||
return retframe;
|
return retframe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue