new: debug and version macros, cleaning up client/server APIs

This commit is contained in:
ngn
2024-06-28 20:51:56 +03:00
parent 6c2f34e8d5
commit 3b19e2840b
25 changed files with 231 additions and 128 deletions

View File

@ -15,7 +15,6 @@ int main(int argc, char *argv[]) {
lm_ctx_t ctx;
lm_ctx_init(&ctx);
ctx.debug = true;
if (!lm_ctx_set_data(&ctx, DATA_DIR)) {
printf("failed to set data dir: %s (%d)\n", lm_strerror(), lm_error());
@ -27,6 +26,8 @@ int main(int argc, char *argv[]) {
goto end;
}
lm_ctx_pools_test(&ctx);
if (!lm_ctx_pools_load(&ctx, true, NULL, NULL)) {
printf("failed to load pools: %s (%d)\n", lm_strerror(), lm_error());
goto end;

View File

@ -15,8 +15,6 @@ int main(int argc, char *argv[]) {
lm_pool_t *pool;
lm_ctx_init(&ctx);
ctx.debug = true;
if ((pool = lm_ctx_pools_add(&ctx, "test", "mptp://127.0.0.1:5858")) == NULL) {
printf("failed to add pool: %s (%d)\n", lm_strerror(), lm_error());
goto end;

4
examples/tests/INFO Normal file
View File

@ -0,0 +1,4 @@
[base]
size = 314073
maintainer = ngn
pubkey = F9E70878C2FB389AEC2BA34CA3654DF5AD9F641D

BIN
examples/tests/LIST Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +0,0 @@
[test]
size = 18221
author = ngn
pubkey = F9E70878C2FB389AEC2BA34CA3654DF5AD9F641

Binary file not shown.

Binary file not shown.