aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rwxr-xr-xservice/entrypoint.sh2
-rw-r--r--service/src/main.c2
-rw-r--r--service/src/stlfile.c5
3 files changed, 3 insertions, 6 deletions
diff --git a/service/entrypoint.sh b/service/entrypoint.sh
index eef45c1..8b6f3e0 100755
--- a/service/entrypoint.sh
+++ b/service/entrypoint.sh
@@ -11,6 +11,6 @@ while [ 1 ]; do
sleep 70
done &
-CMD="ncat --keep-open --listen -p 9000 --max-conns 200 \
+CMD="ncat --keep-open --listen -p 9000 --max-conns 4000 \
--no-shutdown --wait 10s --idle-timeout 180s --exec /service/build/stldoctor"
su -s /bin/sh -c "$CMD" service
diff --git a/service/src/main.c b/service/src/main.c
index d84a460..dd8bca9 100644
--- a/service/src/main.c
+++ b/service/src/main.c
@@ -348,7 +348,7 @@ search_cmd(const char *arg)
while (1) {
resp = ask("> Enter %s [q to quit]: ",
resp ? "another" : "hash");
- if (strchr(resp, 'q')) break;
+ if (strchr(resp, 'q') || !*resp) break;
if (checkalph(resp, ".abcdef0123456789-") != OK) {
ERR("Invalid model id specified\n");
goto exit;
diff --git a/service/src/stlfile.c b/service/src/stlfile.c
index 04e6727..2712f08 100644
--- a/service/src/stlfile.c
+++ b/service/src/stlfile.c
@@ -270,8 +270,7 @@ parse_file_bin(struct parseinfo *info, char *buf, size_t len)
memcpy(info->header, buf, 80);
- if (*buf == '#' && strlen(buf + 1))
- info->solidname = checkp(strdup(buf + 1));
+ info->solidname = checkp(strndup(buf + (*buf == '#'), 80));
bp = buf + 80;
@@ -343,8 +342,6 @@ parse_file(struct parseinfo *info, char *buf, size_t len, char **modelname)
: parse_file_bin(info, buf, len);
if (status == FAIL) return FAIL;
- if (!info->solidname) info->solidname = checkp(strdup(""));
-
info->modelname = *modelname;
*modelname = NULL;