Fix a handful of errors and warnings I've seen. Gets further running in docker, now.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3773 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
e9e1a3e80d
commit
c864041fa0
@ -19,4 +19,4 @@ COPY --from=build /app/apps /app/apps
|
|||||||
COPY --from=build /app/core /app/core
|
COPY --from=build /app/core /app/core
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 12345
|
EXPOSE 12345
|
||||||
CMD ["/app/out/release/tildefriends"]
|
ENTRYPOINT ["/app/out/release/tildefriends"]
|
||||||
|
@ -60,7 +60,6 @@ function socket(request, response, client) {
|
|||||||
blobId = await new Database(user).get('path:' + path);
|
blobId = await new Database(user).get('path:' + path);
|
||||||
if (!blobId) {
|
if (!blobId) {
|
||||||
response.send(JSON.stringify({action: "error", error: message.path + ' not found'}), 0x1);
|
response.send(JSON.stringify({action: "error", error: message.path + ' not found'}), 0x1);
|
||||||
request.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response.send(JSON.stringify({action: "session", credentials: credentials}), 0x1);
|
response.send(JSON.stringify({action: "session", credentials: credentials}), 0x1);
|
||||||
|
@ -422,7 +422,11 @@ function receive(message) {
|
|||||||
} else if (message && message.action == "ping") {
|
} else if (message && message.action == "ping") {
|
||||||
gSocket.send(JSON.stringify({action: "pong"}));
|
gSocket.send(JSON.stringify({action: "pong"}));
|
||||||
} else if (message && message.action == "error") {
|
} else if (message && message.action == "error") {
|
||||||
setStatusMessage(message.error.message + '\n' + message.error.stack, '#f00', false);
|
if (typeof(message.error) == 'string') {
|
||||||
|
setStatusMessage(message.error, '#f00', false);
|
||||||
|
} else {
|
||||||
|
setStatusMessage(message.error.message + '\n' + message.error.stack, '#f00', false);
|
||||||
|
}
|
||||||
console.log(message.error);
|
console.log(message.error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,7 @@ async function loadSettings() {
|
|||||||
gGlobalSettings = JSON.parse(data);
|
gGlobalSettings = JSON.parse(data);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print("Error loading settings from " + kGlobalSettingsFile + ": " + error);
|
print("Error loading settings from " + kGlobalSettingsFile + ":", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,10 @@ bool tf_ssb_db_blob_get(tf_ssb_t* ssb, const char* id, uint8_t** out_blob, size_
|
|||||||
if (out_blob)
|
if (out_blob)
|
||||||
{
|
{
|
||||||
*out_blob = malloc(size + 1);
|
*out_blob = malloc(size + 1);
|
||||||
memcpy(*out_blob, blob, size);
|
if (size)
|
||||||
|
{
|
||||||
|
memcpy(*out_blob, blob, size);
|
||||||
|
}
|
||||||
(*out_blob)[size] = '\0';
|
(*out_blob)[size] = '\0';
|
||||||
}
|
}
|
||||||
if (out_size)
|
if (out_size)
|
||||||
|
Loading…
Reference in New Issue
Block a user