forked from Telodendria/Telodendria
[FIX] Fix conflicts and make branch buildable.
This commit is contained in:
parent
568543ab39
commit
5851298957
4 changed files with 9 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2022-2023 Jordan Bancino <@jordan:bancino.net>
|
* Copyright (C) 2022-2024 Jordan Bancino <@jordan:bancino.net> with
|
||||||
|
* other valuable contributors. See CONTRIBUTORS.txt for the full list.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person
|
* Permission is hereby granted, free of charge, to any person
|
||||||
* obtaining a copy of this software and associated documentation files
|
* obtaining a copy of this software and associated documentation files
|
||||||
|
|
|
@ -53,14 +53,14 @@ ROUTE_IMPL(RouteAliasDirectory, path, argp)
|
||||||
User *user = NULL;
|
User *user = NULL;
|
||||||
|
|
||||||
CommonID aliasID;
|
CommonID aliasID;
|
||||||
Config *config;
|
Config config;
|
||||||
|
|
||||||
aliasID.sigil = '\0';
|
aliasID.sigil = '\0';
|
||||||
aliasID.local = NULL;
|
aliasID.local = NULL;
|
||||||
aliasID.server.hostname = NULL;
|
aliasID.server.hostname = NULL;
|
||||||
aliasID.server.port = NULL;
|
aliasID.server.port = NULL;
|
||||||
|
|
||||||
config = ConfigLock(db);
|
ConfigLock(db, &config);
|
||||||
|
|
||||||
if (!ParseCommonID(alias, &aliasID) || aliasID.sigil != '#')
|
if (!ParseCommonID(alias, &aliasID) || aliasID.sigil != '#')
|
||||||
{
|
{
|
||||||
|
@ -121,7 +121,7 @@ ROUTE_IMPL(RouteAliasDirectory, path, argp)
|
||||||
char *serverPart;
|
char *serverPart;
|
||||||
|
|
||||||
serverPart = ParserRecomposeServerPart(aliasID.server);
|
serverPart = ParserRecomposeServerPart(aliasID.server);
|
||||||
if (!StrEquals(serverPart, config->serverName))
|
if (!StrEquals(serverPart, config.serverName))
|
||||||
{
|
{
|
||||||
msg = "Invalid server name.";
|
msg = "Invalid server name.";
|
||||||
HttpResponseStatus(args->context, HTTP_BAD_REQUEST);
|
HttpResponseStatus(args->context, HTTP_BAD_REQUEST);
|
||||||
|
@ -235,7 +235,7 @@ ROUTE_IMPL(RouteAliasDirectory, path, argp)
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
CommonIDFree(aliasID);
|
CommonIDFree(aliasID);
|
||||||
ConfigUnlock(config);
|
ConfigUnlock(&config);
|
||||||
UserUnlock(user);
|
UserUnlock(user);
|
||||||
DbUnlock(db, ref);
|
DbUnlock(db, ref);
|
||||||
JsonFree(request);
|
JsonFree(request);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2022-2023 Jordan Bancino <@jordan:bancino.net>
|
* Copyright (C) 2022-2024 Jordan Bancino <@jordan:bancino.net> with
|
||||||
|
* other valuable contributors. See CONTRIBUTORS.txt for the full list.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person
|
* Permission is hereby granted, free of charge, to any person
|
||||||
* obtaining a copy of this software and associated documentation files
|
* obtaining a copy of this software and associated documentation files
|
||||||
|
|
Loading…
Reference in a new issue