new: implement PULL command, add join functions
This commit is contained in:
@ -21,14 +21,19 @@ int main(int argc, char *argv[]) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (lm_ctx_pools_add(&ctx, "test", argv[1]) == NULL) {
|
||||
if (lm_ctx_pool_add(&ctx, "base", argv[1]) == NULL) {
|
||||
printf("failed to add pool: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
lm_ctx_pools_test(&ctx, NULL, NULL);
|
||||
lm_ctx_pools_get_info(&ctx, true, NULL, NULL);
|
||||
lm_ctx_pools_get_list(&ctx, true, NULL, NULL);
|
||||
lm_ctx_pool_test(&ctx, NULL, NULL);
|
||||
lm_ctx_pool_get_info(&ctx, true, true, NULL, NULL);
|
||||
lm_ctx_pool_get_list(&ctx, true, true, NULL, NULL);
|
||||
|
||||
if (lm_ctx_package_get(&ctx, "which", NULL) == NULL) {
|
||||
printf("failed to get the package: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = EXIT_SUCCESS;
|
||||
|
||||
|
1
examples/pools/.gitignore
vendored
Normal file
1
examples/pools/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*/LIST_extracted
|
1
examples/pools/test/.gitignore
vendored
1
examples/pools/test/.gitignore
vendored
@ -1 +0,0 @@
|
||||
LIST_extracted
|
@ -21,12 +21,15 @@ int main(int argc, char *argv[]) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (lm_ctx_pools_add(&ctx, "test", "mptp://127.0.0.1:5858") == NULL) {
|
||||
if (lm_ctx_pool_add(&ctx, "base", "mptp://127.0.0.1:5858") == NULL) {
|
||||
printf("failed to add pool: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!lm_ctx_pools_serve(&ctx, argv[1], 10)) {
|
||||
lm_ctx_pool_get_info(&ctx, false, false, NULL, NULL);
|
||||
lm_ctx_pool_get_list(&ctx, false, false, NULL, NULL);
|
||||
|
||||
if (!lm_ctx_pool_serve(&ctx, argv[1], 10)) {
|
||||
printf("failed to serve the pools: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
Reference in New Issue
Block a user