Compare commits
4 Commits
610e756c07
...
v0.0.17
Author | SHA1 | Date | |
---|---|---|---|
3c0b680b8e | |||
895356897b | |||
9164be2f37 | |||
5385264f94 |
@ -4,7 +4,7 @@ MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
VERSION_CODE := 17
|
||||
VERSION_NUMBER := 0.0.17-wip
|
||||
VERSION_NUMBER := 0.0.17
|
||||
VERSION_NAME := Please enjoy responsibly.
|
||||
|
||||
SQLITE_URL := https://www.sqlite.org/2024/sqlite-amalgamation-3450200.zip
|
||||
@ -857,7 +857,7 @@ dist: release-apk iosrelease-ipa
|
||||
@echo [archive] dist/tildefriends-$(VERSION_NUMBER).tar.xz
|
||||
@rm -rf out/tildefriends-$(VERSION_NUMBER)
|
||||
@mkdir -p dist/ out/tildefriends-$(VERSION_NUMBER)
|
||||
@git archive main | tar -x -C out/tildefriends-$(VERSION_NUMBER)
|
||||
@git archive HEAD | tar -x -C out/tildefriends-$(VERSION_NUMBER)
|
||||
@tar \
|
||||
--exclude=apps/welcome* \
|
||||
--exclude=deps/libbacktrace/Isaac.Newton-Opticks.txt \
|
||||
|
@ -2,7 +2,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.unprompted.tildefriends"
|
||||
android:versionCode="17"
|
||||
android:versionName="0.0.17-wip">
|
||||
android:versionName="0.0.17">
|
||||
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="34"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
|
20
src/http.c
20
src/http.c
@ -381,11 +381,19 @@ static void _http_add_body_bytes(tf_http_connection_t* connection, const void* d
|
||||
};
|
||||
connection->request = request;
|
||||
|
||||
tf_http_request_ref(request);
|
||||
tf_trace_begin(connection->http->trace, connection->trace_name ? connection->trace_name : "http");
|
||||
connection->callback(request);
|
||||
tf_trace_end(connection->http->trace);
|
||||
tf_http_request_unref(request);
|
||||
if (!connection->http->is_shutting_down)
|
||||
{
|
||||
tf_http_request_ref(request);
|
||||
tf_trace_begin(connection->http->trace, connection->trace_name ? connection->trace_name : "http");
|
||||
connection->callback(request);
|
||||
tf_trace_end(connection->http->trace);
|
||||
tf_http_request_unref(request);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char* k_payload = tf_http_status_text(503);
|
||||
tf_http_respond(request, 503, NULL, 0, k_payload, strlen(k_payload));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -784,6 +792,8 @@ const char* tf_http_status_text(int status)
|
||||
return "File not found";
|
||||
case 500:
|
||||
return "Internal server error";
|
||||
case 503:
|
||||
return "Service Unavailable";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
|
10
src/main.c
10
src/main.c
@ -11,6 +11,7 @@
|
||||
|
||||
#include "backtrace.h"
|
||||
#include "sqlite3.h"
|
||||
#include "unzip.h"
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
@ -412,11 +413,18 @@ static int _tf_command_run(const char* file, int argc, char* argv[])
|
||||
.http_port = 12345,
|
||||
.https_port = 12346,
|
||||
.ssb_port = 8008,
|
||||
.zip = file,
|
||||
.db_path = k_db_path_default,
|
||||
};
|
||||
bool show_usage = false;
|
||||
|
||||
/* Check if the executable has data attached. */
|
||||
unzFile zip = unzOpen(file);
|
||||
if (zip)
|
||||
{
|
||||
args.zip = file;
|
||||
unzClose(zip);
|
||||
}
|
||||
|
||||
while (!show_usage)
|
||||
{
|
||||
static const struct option k_options[] = {
|
||||
|
@ -1,2 +1,2 @@
|
||||
#define VERSION_NUMBER "0.0.17-wip"
|
||||
#define VERSION_NUMBER "0.0.17"
|
||||
#define VERSION_NAME "Please enjoy responsibly."
|
||||
|
Reference in New Issue
Block a user