bug fix for the stdapi command rev2self. was not playing nice with new thread token stuff.

git-svn-id: file:///home/svn/framework3/trunk@8291 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Stephen Fewer 2010-01-28 13:33:24 +00:00
parent 095b6ee7ed
commit 9f4332ce60
1 changed files with 21 additions and 3 deletions

View File

@ -457,9 +457,27 @@ DWORD request_sys_config_sysinfo(Remote *remote, Packet *packet)
*/
DWORD request_sys_config_rev2self(Remote *remote, Packet *packet)
{
RevertToSelf();
DWORD dwResult = ERROR_SUCCESS;
Packet * response = NULL;
do
{
response = packet_create_response( packet );
if( !response )
{
dwResult = ERROR_INVALID_HANDLE;
break;
}
packet_transmit_empty_response(remote, packet, GetLastError());
core_update_thread_token( remote, NULL );
return ERROR_SUCCESS;
if( !RevertToSelf() )
dwResult = GetLastError();
} while( 0 );
if( response )
packet_transmit_response( dwResult, remote, response );
return dwResult;
}