Skip to content

Commit

Permalink
(net) state-env / tag parsing incorrect
Browse files Browse the repository at this point in the history
This should fix sweep discover mode not finding the correct keys from the store due to a missing state- environment variable (blocked when launching the frameserver).
  • Loading branch information
cipharius committed Sep 16, 2023
1 parent a289194 commit cb1ce26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/engine/arcan_lua.c
Expand Up @@ -11690,6 +11690,7 @@ static int net_open(lua_State* ctx)

struct frameserver_envp args = {
.use_builtin = true,
.preserve_env = true,
.args.builtin.mode = "net-cl",
.args.builtin.resource = instr
};
Expand Down
5 changes: 3 additions & 2 deletions src/frameserver/net/default/net.c
Expand Up @@ -179,8 +179,8 @@ static bool get_keystore(

if (ks.directory.dirfd == -1){
ks.type = A12HELPER_PROVIDER_BASEDIR;
const char** err = NULL;
ks.directory.dirfd = a12helper_keystore_dirfd(err);
const char* err = NULL;
ks.directory.dirfd = a12helper_keystore_dirfd(&err);
if (-1 == ks.directory.dirfd){
arcan_shmif_last_words(C, KEYSTORE_ERRMSG);
return false;
Expand Down Expand Up @@ -761,6 +761,7 @@ static int connect_to_host(
* starting with option 1. */
char* toksep = strrchr(work, '@');
if (toksep){
*toksep = 0;
opts.key = work;
}
/* apparently not, 3..4 */
Expand Down
6 changes: 3 additions & 3 deletions src/platform/posix/appl.c
Expand Up @@ -111,14 +111,14 @@ bool arcan_verifyload_appl(const char* appl_id, const char** errc)
char* p_a = arcan_expand_resource("", RESOURCE_APPL_SHARED);
char* p_b = arcan_expand_resource("", RESOURCE_SYS_APPLSTATE);
if (!p_b)
arcan_override_namespace(p_a, RESOURCE_APPL_STATE);
arcan_softoverride_namespace(p_a, RESOURCE_APPL_STATE);
else if (strncmp(p_a, p_b, strlen(p_a)) == 0){
arcan_override_namespace(p_b, RESOURCE_APPL_STATE);
arcan_softoverride_namespace(p_b, RESOURCE_APPL_STATE);
}
else {
arcan_mem_free(p_b);
p_b = arcan_expand_resource(base, RESOURCE_SYS_APPLSTATE);
arcan_override_namespace(p_b, RESOURCE_APPL_STATE);
arcan_softoverride_namespace(p_b, RESOURCE_APPL_STATE);
}
arcan_mem_free(p_a);
arcan_mem_free(p_b);
Expand Down

0 comments on commit cb1ce26

Please sign in to comment.