From: Adrian S. J. <AS...@pa...> - 2002-01-16 12:59:47
|
Ok, there is a subtle bug in @remote to do with @chpid. The problem is that the following code will never work properly. /* CHPID is carried over an @remote */ context *remote_context =3D new context (player); remote_context->commands_executed =3D commands_executed+1; remote_context->set_effective_id(get_effective_id()); /* Crash trap: Make sure we know how many commands we've = executed for limiting recursion. */ remote_context->set_depth_limit(depth_limit); if (in_command ()) { remote_context->calling_from_command (); // remote_context->call_stack.push (new = Compound_command_and_arguments (get_current_com mand(), remote_context, get_simple_command(), get_arg1(), get_arg2(), = get_effective_id(), 0)); } remote_context->process_basic_command (command.c_str()); mud_scheduler.push_express_job (remote_context); copy_returns_from (*remote_context); delete remote_context; This is because set_effective_id requires there to be something on the call stack to set the id on. Anyone got a suggestion on how to fix this? I've already tried doing the call_stack.push (anyone know why this was removed?), and putting the set_effective_id after that. Adrian. -- Adrian St. John Software Engineer Pan Security International Ltd. T 0121 780 0619 as...@pa... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 Pan Security International Limited, Vienna House, International Square, = Birmingham International Park, Bickenhill Lane, Solihull B37 7GN United = Kingdom. Registered company number 3965174=20 This message may contain information which is confidential and subject = to legal privilege. If you are not the intended recipient, you may not = peruse, use, disseminate, distribute or copy this message. If you have = received this message in error, please notify the sender immediately by = e-mail, facsimile or telephone and return and/or destroy the original = message. Pan Security International Limited accept no responsibility for = any changes made to this message after it has been sent by the original = author. |