1259 |
// the script's "init" event handler is only executed |
// the script's "init" event handler is only executed |
1260 |
// once (when the script is loaded or reloaded) |
// once (when the script is loaded or reloaded) |
1261 |
if (pEngineChannel->pScript && pEngineChannel->pScript->handlerInit) { |
if (pEngineChannel->pScript && pEngineChannel->pScript->handlerInit) { |
1262 |
|
dmsg(5,("Engine: exec handlerInit %p\n", pEngineChannel->pScript->handlerInit)); |
1263 |
RTList<ScriptEvent>::Iterator itScriptEvent = |
RTList<ScriptEvent>::Iterator itScriptEvent = |
1264 |
pEngineChannel->pScript->pEvents->allocAppend(); |
pEngineChannel->pScript->pEvents->allocAppend(); |
1265 |
|
|
1266 |
itScriptEvent->cause.pEngineChannel = pEngineChannel; |
itScriptEvent->cause.pEngineChannel = pEngineChannel; |
1267 |
itScriptEvent->handlers[0] = pEngineChannel->pScript->handlerInit; |
itScriptEvent->handlers[0] = pEngineChannel->pScript->handlerInit; |
1268 |
itScriptEvent->handlers[1] = NULL; |
itScriptEvent->handlers[1] = NULL; |
1269 |
|
itScriptEvent->currentHandler = 0; |
1270 |
|
itScriptEvent->executionSlices = 0; |
1271 |
|
itScriptEvent->ignoreAllWaitCalls = false; |
1272 |
|
itScriptEvent->handlerType = VM_EVENT_HANDLER_INIT; |
1273 |
|
|
1274 |
VMExecStatus_t res = pScriptVM->exec( |
VMExecStatus_t res = pScriptVM->exec( |
1275 |
pEngineChannel->pScript->parserContext, &*itScriptEvent |
pEngineChannel->pScript->parserContext, &*itScriptEvent |