forked from Telodendria/Telodendria
parent
288ab5da54
commit
3c11d666c8
2 changed files with 2 additions and 5 deletions
|
@ -36,7 +36,7 @@
|
||||||
ROUTE_IMPL(RouteAliasDirectory, path, argp)
|
ROUTE_IMPL(RouteAliasDirectory, path, argp)
|
||||||
{
|
{
|
||||||
RouteArgs *args = argp;
|
RouteArgs *args = argp;
|
||||||
char *alias = HttpUrlDecode(ArrayGet(path, 0));
|
char *alias = ArrayGet(path, 0);
|
||||||
|
|
||||||
HashMap *request = NULL;
|
HashMap *request = NULL;
|
||||||
HashMap *response;
|
HashMap *response;
|
||||||
|
@ -124,7 +124,6 @@ ROUTE_IMPL(RouteAliasDirectory, path, argp)
|
||||||
* refactor for it to use a ServerPart */
|
* refactor for it to use a ServerPart */
|
||||||
if (!StrEquals(aliasID.server.hostname, config->serverName))
|
if (!StrEquals(aliasID.server.hostname, config->serverName))
|
||||||
{
|
{
|
||||||
Log(LOG_INFO, "'%s' != '%s'", aliasID.server.hostname, config->serverName);
|
|
||||||
msg = "Invalid server name.";
|
msg = "Invalid server name.";
|
||||||
HttpResponseStatus(args->context, HTTP_BAD_REQUEST);
|
HttpResponseStatus(args->context, HTTP_BAD_REQUEST);
|
||||||
response = MatrixErrorCreate(M_INVALID_PARAM, msg);
|
response = MatrixErrorCreate(M_INVALID_PARAM, msg);
|
||||||
|
@ -237,6 +236,5 @@ finish:
|
||||||
UserUnlock(user);
|
UserUnlock(user);
|
||||||
DbUnlock(db, ref);
|
DbUnlock(db, ref);
|
||||||
JsonFree(request);
|
JsonFree(request);
|
||||||
Free(alias);
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
ROUTE_IMPL(RouteRoomAliases, path, argp)
|
ROUTE_IMPL(RouteRoomAliases, path, argp)
|
||||||
{
|
{
|
||||||
RouteArgs *args = argp;
|
RouteArgs *args = argp;
|
||||||
char *roomId = HttpUrlDecode(ArrayGet(path, 0));
|
char *roomId = ArrayGet(path, 0);
|
||||||
char *token;
|
char *token;
|
||||||
char *msg;
|
char *msg;
|
||||||
|
|
||||||
|
@ -77,6 +77,5 @@ ROUTE_IMPL(RouteRoomAliases, path, argp)
|
||||||
finish:
|
finish:
|
||||||
DbUnlock(db, ref);
|
DbUnlock(db, ref);
|
||||||
UserUnlock(user);
|
UserUnlock(user);
|
||||||
Free(roomId);
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue