From ccc563e24dfc001b8e5689e7cb5faa834986bdc1 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 3 Aug 2021 14:07:52 +1000 Subject: Move window and pane opening to ROBUST starting time. So the writing of the pane ID files is also then. Open those pane ID files also before the main loop. So all the actions have access. Also some clean up of that code. --- src/sledjchisl/sledjchisl.c | 500 +++++++++++++++++++++++--------------------- 1 file changed, 261 insertions(+), 239 deletions(-) (limited to 'src') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index c8622d8..093c3ef 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -7780,6 +7780,10 @@ fcgiDone: //T("ARGS - %i |%s| |%s|", currentMode, toys.optargs[0], target); + qtreetbl_obj_t obj0, obj1; + qLua *q0, *q1; + int count = 0, window = 0, panes = 4, pane = 0; + //////////////////////////////////////////////////////////////////////////////////////////////////// // Start ROBUST or join the tmux session. //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -7795,6 +7799,139 @@ fcgiDone: sendTmuxCmd(d, c); free(c); doTmuxCmd("select-pane -t 0 -T 'ROBUST'", Tcmd, scRun, Tsocket); + +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Create all the tmux windows, panes, and temporary .ini files, coz OpenSim sucketh. +//////////////////////////////////////////////////////////////////////////////////////////////////// + memset((void*)&obj0, 0, sizeof(obj0)); + ourSims->simsLua->lock(ourSims->simsLua); + while(ourSims->simsLua->getnext(ourSims->simsLua, &obj0, false) == true) + { + q0 = obj0.data; + char *type = "unsorted"; + + if (LUA_TTABLE == q0->type) + { + panes = 4; + q1 = q0->v.t->get(q0->v.t, "number", NULL, false); if (NULL != q1) window = q1->v.f - 1; + q1 = q0->v.t->get(q0->v.t, "panes", NULL, false); if (NULL != q1) panes = q1->v.f; + q1 = q0->v.t->get(q0->v.t, "type", NULL, false); if (NULL != q1) type = q1->v.s; + if (0 == panes) + { + pane = 2; + window = 0; + type = Ttab; + } + else if (0 != pane) + { + pane = 0; + window++; + } + + T("Prepping sims of type %s, window %d, %d panes per window.", type, window, panes); + + memset((void*)&obj1, 0, sizeof(obj1)); + q0->v.t->lock(q0->v.t); + while(q0->v.t->getnext(q0->v.t, &obj1, false) == true) + { + q1 = obj1.data; + + if ((strcmp("number", obj1.name) != 0) && (strcmp("panes", obj1.name) != 0) && (strcmp("type", obj1.name) != 0)) + { + char *sim = q1->v.s; + qlisttbl_t *ini = ourSims->byTab->get(ourSims->byTab, sim, NULL, false); + + if (NULL == ini) + E("Sim %s not found in ini list!", sim); + else + { + simData *simd = ini->get(ini, "SIM DATA", NULL, false); + char *path = xmprintf("%s/%s.shini", scEtc, simd->tab); + char *newPath = xmprintf("%s/sim%d/%s.ini", scTemp, count, simd->tab); // Coz OpenSim. + char *cmd; + + simd->window = window; + simd->pane = pane; + + // The bash invocations are so that the PATH is properly propagated. + if (0 == panes) + doTmuxCmd("split-window -hp 50 -d -t '%s:0.1' bash", Tconsole); + else if (0 == pane) + { + doTmuxCmd("new-window -dc '%s/current/bin' -n '%s' -t '%s:%d' bash", scRoot, type, Tconsole, window); + if (2 <= panes) + doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0' bash", Tconsole, window); + if (4 <= panes) + { + doTmuxCmd("split-window -vp 50 -d -t '%s:%d.1' bash", Tconsole, window); + doTmuxCmd("split-window -vp 50 -d -t '%s:%d.0' bash", Tconsole, window); + } + if (8 <= panes) + { + doTmuxCmd("split-window -hp 50 -d -t '%s:%d.3' bash", Tconsole, window); + doTmuxCmd("split-window -hp 50 -d -t '%s:%d.2' bash", Tconsole, window); + doTmuxCmd("split-window -hp 50 -d -t '%s:%d.1' bash", Tconsole, window); + doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0' bash", Tconsole, window); + } + } + snprintf(toybuf, sizeof(toybuf), "echo 'IDs={' >%s/IDs_%d.lua", scTemp, window); + system(toybuf); + doTmuxCmd("list-panes -t %d -F \"['%d #{pane_index}'] = '#{window_id}.#{pane_id}',\" >> %s/IDs_%d.lua", window, window, scTemp, window); + snprintf(toybuf, sizeof(toybuf), "echo '}\nreturn IDs' >>%s/IDs_%d.lua", scTemp, window); + system(toybuf); + + snprintf(toybuf, sizeof(toybuf), "%s/IDs_%d.lua", scTemp, window); + qtreetbl_t *IDs = Lua2tree(toybuf, "IDs"); + snprintf(toybuf, sizeof(toybuf), "%d %d", window, pane); + simd->paneID = xmprintf("%s", qLuaGet(IDs, toybuf)->v.s); + freeLuaTree(IDs); + + simd->portH = 8004 + count * 2; + simd->portU = 8005 + count * 2; + cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" + " -e 's@\\[Region\\]@" + " paneID = \"\\%s\"\\n" + "\\[Startup\\]\\n" + " PIDFile = \"\\$\\{Paths\\|CachePath\\}\\/\\$\\{Const\\|mysim\\}\\.pid\"\\n" + " LogFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSim_\\$\\{Const\\|mysim\\}\\.log\"\\n" + " StatsLogFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSimStats_\\$\\{Const\\|mysim\\}\\.log\"\\n" + " ConsoleHistoryFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSimConsoleHistory_\\$\\{Const\\|mysim\\}\\.txt\"\\n" + "\\n\\[Region\\]@'" + " -e 's/InternalPort[[:space:]]*=[[:space:]]*[[:digit:]]+/InternalPort = %d/'" + " -e 's/InternalPort[[:space:]]*=[[:space:]]*\"[[:digit:]]+\"/InternalPort = %d/'" + " -e 's/http_listener_port[[:space:]]*=[[:space:]]*[[:digit:]]+/http_listener_port = %d/'" + " -e 's/http_listener_port[[:space:]]*=[[:space:]]*\"[[:digit:]]+\"/http_listener_port = %d/'" + " %s >%s", + scTemp, count, + scTemp, count, + simd->paneID, + simd->portU, + simd->portU, + simd->portH, + simd->portH, + path, newPath); + D("Writing .ini file %s with ports %d %d", newPath, simd->portH, simd->portU); + int j = system(cmd); + if (!WIFEXITED(j)) + E("sed command failed!"); + free(cmd); + free(newPath); + free(path); + count++; + pane++; + if (pane >= panes) + { + pane = 0; + window++; + } + } + } + } + q0->v.t->unlock(q0->v.t); + } + } + ourSims->simsLua->unlock(ourSims->simsLua); + waitTmuxText(d, "INITIALIZATION COMPLETE FOR ROBUST"); I("ROBUST is done starting up."); free(d); @@ -7805,6 +7942,77 @@ fcgiDone: doTmuxCmd("select-window -t '%s' \\; attach-session -t '%s'", Tconsole, Tconsole); goto finished; } + else + { + // Find out where the sims are in tmux. + memset((void*)&obj0, 0, sizeof(obj0)); + ourSims->simsLua->lock(ourSims->simsLua); + while(ourSims->simsLua->getnext(ourSims->simsLua, &obj0, false) == true) + { + q0 = obj0.data; + char *type = "unsorted"; + + if (LUA_TTABLE == q0->type) + { + panes = 4; + q1 = q0->v.t->get(q0->v.t, "number", NULL, false); if (NULL != q1) window = q1->v.f - 1; + q1 = q0->v.t->get(q0->v.t, "panes", NULL, false); if (NULL != q1) panes = q1->v.f; + q1 = q0->v.t->get(q0->v.t, "type", NULL, false); if (NULL != q1) type = q1->v.s; + if (0 == panes) + { + pane = 2; + window = 0; + type = Ttab; + } + else if (0 != pane) + { + pane = 0; + window++; + } + + memset((void*)&obj1, 0, sizeof(obj1)); + q0->v.t->lock(q0->v.t); + while(q0->v.t->getnext(q0->v.t, &obj1, false) == true) + { + q1 = obj1.data; + + if ((strcmp("number", obj1.name) != 0) && (strcmp("panes", obj1.name) != 0) && (strcmp("type", obj1.name) != 0)) + { + char *sim = q1->v.s; + qlisttbl_t *ini = ourSims->byTab->get(ourSims->byTab, sim, NULL, false); + + if (NULL == ini) + E("Sim %s not found in ini list!", sim); + else + { + simData *simd = ini->get(ini, "SIM DATA", NULL, false); + + simd->window = window; + simd->pane = pane; + + char *newPath = xmprintf("%s/sim%d/%s.ini", scTemp, count, simd->tab); // Coz OpenSim. + + snprintf(toybuf, sizeof(toybuf), "%s/IDs_%d.lua", scTemp, window); + qtreetbl_t *IDs = Lua2tree(toybuf, "IDs"); + snprintf(toybuf, sizeof(toybuf), "%d %d", window, pane); + simd->paneID = xmprintf("%s", qLuaGet(IDs, toybuf)->v.s); + freeLuaTree(IDs); + free(newPath); + count++; + pane++; + if (pane >= panes) + { + pane = 0; + window++; + } + } + } + } + q0->v.t->unlock(q0->v.t); + } + } + ourSims->simsLua->unlock(ourSims->simsLua); + } /* sims = -- Note these are .shini / tmux tab short names. @@ -7818,10 +8026,11 @@ sims = -- Note these are .shini / tmux tab short names. {["type"] = "Heavies"; ["number"] = 18; "DP", "ARSE"}, } */ - qtreetbl_obj_t obj0, obj1; - qLua *q0, *q1; - int count = 0, window = 0, panes = 4, pane = 0; +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Sim wrangling loop. +//////////////////////////////////////////////////////////////////////////////////////////////////// + count = 0; window = 0; panes = 4; pane = 0; memset((void*)&obj0, 0, sizeof(obj0)); ourSims->simsLua->lock(ourSims->simsLua); while(ourSims->simsLua->getnext(ourSims->simsLua, &obj0, false) == true) @@ -7839,6 +8048,7 @@ sims = -- Note these are .shini / tmux tab short names. { pane = 2; window = 0; + type = Ttab; } else if (0 != pane) { @@ -7846,7 +8056,7 @@ sims = -- Note these are .shini / tmux tab short names. window++; } - T("Doing sims of type %s, window %d, %d panes per window. %d", type, window, panes, pane); + T("Doing sims of type %s, window %d, %d panes per window.", type, window, panes); memset((void*)&obj1, 0, sizeof(obj1)); q0->v.t->lock(q0->v.t); while(q0->v.t->getnext(q0->v.t, &obj1, false) == true) @@ -7863,248 +8073,58 @@ sims = -- Note these are .shini / tmux tab short names. else { simData *simd = ini->get(ini, "SIM DATA", NULL, false); - char *nm = simd->tab; - char *name = simd->name; - - simd->window = window; - simd->pane = pane; - I("%s is starting up in tab [%d:%s](pane %d), tmux ID = %s, from %s/sim%d.", name, window, type, pane, simd->paneID, scTemp, count); - - - count++; - } - - pane++; - if (pane >= panes) - { - pane = 0; - window++; - } - } - } - q0->v.t->unlock(q0->v.t); - } - } - ourSims->simsLua->unlock(ourSims->simsLua); -goto finished; - - - - - snprintf(toybuf, sizeof(toybuf), "%s/sims.lua", scEtc); - if (0 == lstat(toybuf, &st)) - { -// int count = 0, window = 0, panes = 4, pane = 0; - - I("Loading sims file - %s", toybuf); - status = luaL_loadfile(L, toybuf); - if (status) // If something went wrong, error message is at the top of the stack. - E("Couldn't load file: %s", lua_tostring(L, -1)); - else - { - result = lua_pcall(L, 0, LUA_MULTRET, 0); - if (result) - E("Failed to run script: %s", lua_tostring(L, -1)); - else - { -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Sim wrangling loop. -//////////////////////////////////////////////////////////////////////////////////////////////////// - lua_getglobal(L, "sims"); - - lua_pushnil(L); // lua_next() needs the last key at the top, but we don't start with one. - while(lua_next(L, -2) != 0) // pushes key then value. - { // key -2 value -1 - if (lua_istable(L, -1)) - { - const char *type = "unsorted"; - - panes = 4; - lua_getfield(L, -1, "type"); - lua_getfield(L, -2, "number"); - lua_getfield(L, -3, "panes"); - if (LUA_TNIL != lua_type(L, -3)) type = lua_tostring(L, -3); - if (LUA_TNIL != lua_type(L, -2)) window = lua_tonumber(L, -2) - 1; - if (LUA_TNIL != lua_type(L, -1)) panes = lua_tonumber(L, -1); - lua_pop(L, 3); - if (0 == panes) + // Check if only doing a single sim. + int cont = FALSE; + if (NULL != target) { - pane = 2; - window = 0; + cont = TRUE; + snprintf(toybuf, sizeof(toybuf), "%s.shini", simd->tab); + if + ( + (strcmp(target, sim) == 0) || + (strcmp(target, simd->name) == 0) || + (strcmp(target, simd->tab) == 0) || + (strcmp(target, toybuf) == 0) + ) + cont = FALSE; + snprintf(toybuf, sizeof(toybuf), "%s.ini", simd->tab); + if (strcmp(target, toybuf) == 0) + cont = FALSE; + snprintf(toybuf, sizeof(toybuf), "sim%d.ini", count); + if (strcmp(target, toybuf) == 0) + cont = FALSE; } - else if (0 != pane) + if (!cont) { - pane = 0; - window++; - } - - T("Doing sims of type %s, window %d, %d panes per window", type, window, panes); - lua_pushnil(L); - while(lua_next(L, -2) != 0) - { - char *sim = (char *) lua_tostring(L, -1); - - if (LUA_TNUMBER == lua_type(L, -2)) - { - int num; - char *nm = NULL; - char *name;// = getSimName(ourSims->sims[i], &nm, &num); - qlisttbl_t *ini = ourSims->byTab->get(ourSims->byTab, sim, NULL, false); - simData *simd; - - if (NULL == ini) - { - E("Sim %s not found in ini list!", sim); - } - else - { - simd = ini->get(ini, "SIM DATA", NULL, false); - name = simd->name; - nm = simd->tab; - simd->window = window; - simd->pane = pane; - } - - if (NULL != target) - { - int cont = TRUE; - - snprintf(toybuf, sizeof(toybuf), "%s.shini", nm); - if - ( - (strcmp(target, sim) == 0) || - (strcmp(target, name) == 0) || - (strcmp(target, nm) == 0) || - (strcmp(target, toybuf) == 0) - ) - cont = FALSE; - snprintf(toybuf, sizeof(toybuf), "%s.ini", nm); - if (strcmp(target, toybuf) == 0) - cont = FALSE; - snprintf(toybuf, sizeof(toybuf), "sim%d.ini", count); - if (strcmp(target, toybuf) == 0) - cont = FALSE; - if (cont) - goto nextSim; - } - switch (currentMode) { case START : // "start sim01" "start 'Welcome sim'" "start Welcome.ini" "start Welcome" "start" start everything { // TODO - check if sim is down, but tmux window is still up, and close the tmux window first. - if (!checkSimIsRunning(nm)) + if (!checkSimIsRunning(simd->tab)) { - char *path = xmprintf("%s/%s.shini", scEtc, nm); - char *newPath = xmprintf("%s/sim%d/%s.ini", scTemp, count, nm); // Coz OpenSim. - char *cmd; - - // The bash invocations are so that the PATH is properly propagated. - if (0 == panes) - doTmuxCmd("split-window -hp 50 -d -t '%s:0.1' bash", Tconsole); - else if (0 == pane) - { - doTmuxCmd("new-window -dc '%s/current/bin' -n '%s' -t '%s:%d' bash", scRoot, type, Tconsole, window); - if (2 <= panes) - doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0' bash", Tconsole, window); - if (4 <= panes) - { - doTmuxCmd("split-window -vp 50 -d -t '%s:%d.1' bash", Tconsole, window); - doTmuxCmd("split-window -vp 50 -d -t '%s:%d.0' bash", Tconsole, window); - } - if (8 <= panes) - { - doTmuxCmd("split-window -hp 50 -d -t '%s:%d.3' bash", Tconsole, window); - doTmuxCmd("split-window -hp 50 -d -t '%s:%d.2' bash", Tconsole, window); - doTmuxCmd("split-window -hp 50 -d -t '%s:%d.1' bash", Tconsole, window); - doTmuxCmd("split-window -hp 50 -d -t '%s:%d.0' bash", Tconsole, window); - } -/* TODO - -IDs={ -['21 0'] = '@17.%65', -['21 1'] = '@17.%68', -['21 2'] = '@17.%66', -['21 3'] = '@17.%67', -} -return IDs - -Move window and pane opening to ROBUST starting time. - So the writing of the pane ID files is also then. - Open those pane ID files also before the main loop. - So all the actions have access. - -Leave empty panes as is. -Don't bother to close panes unless we are doing a full stop. -Also clear out tmp when doing a full stop. -*/ - } - snprintf(toybuf, sizeof(toybuf), "echo 'IDs={' >%s/IDs_%d.lua", scTemp, window); - system(toybuf); - doTmuxCmd("list-panes -t %d -F \"['%d #{pane_index}'] = '#{window_id}.#{pane_id}',\" >> %s/IDs_%d.lua", window, window, scTemp, window); - snprintf(toybuf, sizeof(toybuf), "echo '}\nreturn IDs' >>%s/IDs_%d.lua", scTemp, window); - system(toybuf); - - snprintf(toybuf, sizeof(toybuf), "%s/IDs_%d.lua", scTemp, window); - qtreetbl_t *IDs = Lua2tree(toybuf, "IDs"); - snprintf(toybuf, sizeof(toybuf), "%d %d", window, pane); - simd->paneID = qLuaGet(IDs, toybuf)->v.s; - - I("%s is starting up in tab [%d:%s](pane %d), tmux ID = %s, from %s/sim%d.", name, window, type, pane, simd->paneID, scTemp, count); - simd->portH = 8004 + count * 2; - simd->portU = 8005 + count * 2; - cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" - " -e 's@\\[Region\\]@" - " paneID = \"\\%s\"\\n" - "\\[Startup\\]\\n" - " PIDFile = \"\\$\\{Paths\\|CachePath\\}\\/\\$\\{Const\\|mysim\\}\\.pid\"\\n" - " LogFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSim_\\$\\{Const\\|mysim\\}\\.log\"\\n" - " StatsLogFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSimStats_\\$\\{Const\\|mysim\\}\\.log\"\\n" - " ConsoleHistoryFile = \"\\$\\{Paths\\|LogPath\\}\\/OpenSimConsoleHistory_\\$\\{Const\\|mysim\\}\\.txt\"\\n" - "\\n\\[Region\\]@'" - " -e 's/InternalPort[[:space:]]*=[[:space:]]*[[:digit:]]+/InternalPort = %d/'" - " -e 's/InternalPort[[:space:]]*=[[:space:]]*\"[[:digit:]]+\"/InternalPort = %d/'" - " -e 's/http_listener_port[[:space:]]*=[[:space:]]*[[:digit:]]+/http_listener_port = %d/'" - " -e 's/http_listener_port[[:space:]]*=[[:space:]]*\"[[:digit:]]+\"/http_listener_port = %d/'" - " %s >%s", - scTemp, count, - scTemp, count, - simd->paneID, - simd->portU, - simd->portU, - simd->portH, - simd->portH, - path, newPath); - int j; - - D("Writing .ini file %s with ports %d %d", newPath, 8004 + count * 2, 8005 + count * 2); - j = system(cmd); - if (!WIFEXITED(j)) - E("sed command failed!"); - free(cmd); - - doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, nm); + I("Tmux tab [%d:%s](pane %d) tmux ID %s, from %s/sim%d - %s is starting.", window, type, pane, simd->paneID, scTemp, count, simd->name); + doTmuxCmd("select-pane -t %s:%s -T '%s'", Tconsole, simd->paneID, simd->tab); { snprintf(toybuf, sizeof(toybuf), "mono OpenSim.exe -inidirectory=%s/sim%d", scTemp, count); sendTmuxCmd(simd->paneID, toybuf); if (0 == doWait) { - snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", name); + snprintf(toybuf, sizeof(toybuf), "INITIALIZATION COMPLETE FOR %s", simd->name); waitTmuxText(simd->paneID, toybuf); - I("%s is done starting up.", name); + I("%s is done starting up.", simd->name); la = waitLoadAverage(la, loadAverageInc, simTimeOut); } count++; - doWait = (count % bulkSims); + doWait = (count % bulkSims); } - free(newPath); - free(path); } break; } case BACKUP : // "backup 'onefang rejected'" "backup sim01" "backup 'Welcome Sim'" "backup" backup everything { // TODO - If it's not a sim code, and not a sim name, it's an account inventory. - if (checkSimIsRunning(nm)) + if (checkSimIsRunning(simd->tab)) { struct timeval tv; time_t curtime; @@ -8119,15 +8139,15 @@ Also clear out tmp when doing a full stop. gettimeofday(&tv, NULL); curtime = tv.tv_sec; strftime(date, DATE_TIME_LEN, "%F_%T", localtime(&curtime)); - I("%s is being backed up to %s/backups/%s-%s.oar.", name, scRoot, nm, date); - snprintf(toybuf, sizeof(toybuf), "save oar --all %s/backups/%s-%s.oar", scRoot, nm, date); + I("%s is being backed up to %s/backups/%s-%s.oar.", simd->name, scRoot, simd->tab, date); + snprintf(toybuf, sizeof(toybuf), "save oar --all %s/backups/%s-%s.oar", scRoot, simd->tab, date); sendTmuxCmd(cmd, toybuf); // if (0 == doWait) { memset(toybuf, 0, sizeof(toybuf)); - snprintf(toybuf, sizeof(toybuf), "Finished writing out OAR for %s", name); + snprintf(toybuf, sizeof(toybuf), "Finished writing out OAR for %s", simd->name); waitTmuxText(cmd, toybuf); - I("%s is done backing up.", name); + I("%s is done backing up.", simd->name); // TODO - should delete / gitAR the old ones now. // Have a config option for delete / gitAR. la = waitLoadAverage(la, loadAverageInc, simTimeOut); @@ -8154,10 +8174,14 @@ Also clear out tmp when doing a full stop. case STOP : // "stop sim01" "stop 'Welcome Sim'" "stop" stop everything { - if (checkSimIsRunning(nm)) + if (checkSimIsRunning(simd->tab)) { +/* TODO - +Leave empty panes as is. +Don't bother to close panes unless we are doing a full stop. +Also clear out tmp when doing a full stop. +*/ cmd = xmprintf("%d.%d", simd->window, simd->pane); - I("%s is stopping in pane %d.%d.", name, simd->window, simd->pane); sendTmuxCmd(cmd, "quit"); free(cmd); // There's three things that might happen - @@ -8171,7 +8195,7 @@ Also clear out tmp when doing a full stop. // Could also loop on checkSimIsRunning(sim) // snprintf(toybuf, sizeof(toybuf), "[SHUTDOWN]: Shutdown processing on main thread complete. Exiting..."); // waitTmuxText(nm, toybuf); -// I("%s is done stopping.", name); +// I("%s is done stopping.", simd->name); // la = waitLoadAverage(la, loadAverageInc, simTimeOut); } break; @@ -8183,24 +8207,22 @@ Also clear out tmp when doing a full stop. break; } } -nextSim: - pane++; - if (pane >= panes) - { - pane = 0; - window++; - } -//if (4 < number) break; - } - lua_pop(L, 1); // removes 'value'; keeps 'key' for next iteration } + } - lua_pop(L, 1); + pane++; + if (pane >= panes) + { + pane = 0; + window++; + } } } + q0->v.t->unlock(q0->v.t); } } + ourSims->simsLua->unlock(ourSims->simsLua); if (START == currentMode) -- cgit v1.1