diff options
author | onefang | 2021-07-30 04:51:55 +1000 |
---|---|---|
committer | onefang | 2021-07-30 04:51:55 +1000 |
commit | b5653233b382bb631d0ad3a9f88835f929f9781d (patch) | |
tree | 7bc55a04e5144d6a07e4d11640c6e9984422522b | |
parent | Remove useless memset()s. (diff) | |
download | opensim-SC-b5653233b382bb631d0ad3a9f88835f929f9781d.zip opensim-SC-b5653233b382bb631d0ad3a9f88835f929f9781d.tar.gz opensim-SC-b5653233b382bb631d0ad3a9f88835f929f9781d.tar.bz2 opensim-SC-b5653233b382bb631d0ad3a9f88835f929f9781d.tar.xz |
Clean up the simData structure.
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index cfa1246..978bf33 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -719,11 +719,10 @@ struct dirtree *dirtree_handle_callback(struct dirtree *new, int (*callback)(str | |||
719 | typedef struct _simData simData; | 719 | typedef struct _simData simData; |
720 | struct _simData | 720 | struct _simData |
721 | { | 721 | { |
722 | // portH is the HTTP port for the sim, portI is the UDP port for the sim. | 722 | // portH is the HTTP port for the sim, portU is the UDP port for the sim. |
723 | int num, locX, locY, sizeX, sizeY, sizeZ, portH, portI, maxPrims; | 723 | int locX, locY, sizeX, sizeY, sizeZ, portH, portU, maxPrims; |
724 | char *name, *tab, *UUID, *regionType, *estate, *owner; | 724 | char *name, *tab, *UUID, *regionType, *estate, *owner; |
725 | int window, pane; | 725 | int window, pane; |
726 | // char *nmbr; | ||
727 | }; | 726 | }; |
728 | 727 | ||
729 | typedef struct _simList simList; | 728 | typedef struct _simList simList; |
@@ -867,7 +866,6 @@ ini->putstr(ini, "INI FILE", name); | |||
867 | [Network] | 866 | [Network] |
868 | http_listener_port = 9007 | 867 | http_listener_port = 9007 |
869 | */ | 868 | */ |
870 | simd->num = getIntFromIni(ini, "Const.mysim"); | ||
871 | simd->name = qstrunchar(ini->getstr(ini, "Region.RegionName", false), '"', '"'); | 869 | simd->name = qstrunchar(ini->getstr(ini, "Region.RegionName", false), '"', '"'); |
872 | simd->UUID = qstrunchar(ini->getstr(ini, "Region.RegionUUID", false), '"', '"'); | 870 | simd->UUID = qstrunchar(ini->getstr(ini, "Region.RegionUUID", false), '"', '"'); |
873 | simd->regionType = qstrunchar(ini->getstr(ini, "Region.RegionType", false), '"', '"'); | 871 | simd->regionType = qstrunchar(ini->getstr(ini, "Region.RegionType", false), '"', '"'); |
@@ -875,7 +873,6 @@ ini->putstr(ini, "INI FILE", name); | |||
875 | simd->sizeY = getIntFromIni(ini, "Region.SizeY"); | 873 | simd->sizeY = getIntFromIni(ini, "Region.SizeY"); |
876 | simd->sizeZ = getIntFromIni(ini, "Region.SizeZ"); | 874 | simd->sizeZ = getIntFromIni(ini, "Region.SizeZ"); |
877 | simd->tab = name; | 875 | simd->tab = name; |
878 | // simd->nmbr = sim; | ||
879 | ini->put(ini, "SIM DATA", simd, sizeof(simData)); | 876 | ini->put(ini, "SIM DATA", simd, sizeof(simData)); |
880 | ourSims->tbl->put(ourSims->tbl, sim, ini, sizeof(qlisttbl_t)); | 877 | ourSims->tbl->put(ourSims->tbl, sim, ini, sizeof(qlisttbl_t)); |
881 | ourSims->byTab->put(ourSims->byTab, name, ini, sizeof(qlisttbl_t)); | 878 | ourSims->byTab->put(ourSims->byTab, name, ini, sizeof(qlisttbl_t)); |
@@ -7769,7 +7766,6 @@ sims = -- Note these are .shini / tmux tab short names. | |||
7769 | if | 7766 | if |
7770 | ( | 7767 | ( |
7771 | (strcmp(target, sim) == 0) || | 7768 | (strcmp(target, sim) == 0) || |
7772 | // (strcmp(target, simd->nmbr) == 0) || | ||
7773 | (strcmp(target, name) == 0) || | 7769 | (strcmp(target, name) == 0) || |
7774 | (strcmp(target, nm) == 0) || | 7770 | (strcmp(target, nm) == 0) || |
7775 | (strcmp(target, toybuf) == 0) | 7771 | (strcmp(target, toybuf) == 0) |
@@ -7844,6 +7840,8 @@ Is there a "switch to pane 1" command? Nope | |||
7844 | I("%s is starting up in tab [%d:%s] pane .%d, from %s/sim%d.", name, window, type, pane, scTemp, count); | 7840 | I("%s is starting up in tab [%d:%s] pane .%d, from %s/sim%d.", name, window, type, pane, scTemp, count); |
7845 | 7841 | ||
7846 | char *cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" | 7842 | char *cmd = xmprintf("rm -fr %s/sim%d; mkdir -p %s/sim%d; sed -E" |
7843 | simd->portH = 8004 + count * 2; | ||
7844 | simd->portU = 8005 + count * 2; | ||
7847 | " -e 's@\\[Region\\]@" | 7845 | " -e 's@\\[Region\\]@" |
7848 | "\\[Startup\\]\\n" | 7846 | "\\[Startup\\]\\n" |
7849 | " PIDFile = \"\\$\\{Paths\\|CachePath\\}\\/\\$\\{Const\\|mysim\\}\\.pid\"\\n" | 7847 | " PIDFile = \"\\$\\{Paths\\|CachePath\\}\\/\\$\\{Const\\|mysim\\}\\.pid\"\\n" |
@@ -7858,10 +7856,10 @@ Is there a "switch to pane 1" command? Nope | |||
7858 | " %s >%s", | 7856 | " %s >%s", |
7859 | scTemp, count, | 7857 | scTemp, count, |
7860 | scTemp, count, | 7858 | scTemp, count, |
7861 | 8004 + count * 2, | 7859 | simd->portU, |
7862 | 8004 + count * 2, | 7860 | simd->portU, |
7863 | 8005 + count * 2, | 7861 | simd->portH, |
7864 | 8005 + count * 2, | 7862 | simd->portH, |
7865 | path, newPath); | 7863 | path, newPath); |
7866 | int j; | 7864 | int j; |
7867 | 7865 | ||