diff --git a/src/Routes/RouteSync.c b/src/Routes/RouteSync.c index ecfc687..72414a3 100644 --- a/src/Routes/RouteSync.c +++ b/src/Routes/RouteSync.c @@ -78,7 +78,7 @@ IsRoomFiltered(Filter *filter, char *roomID) } } /* TODO: Consider rooms */ - return true; + return false; } ROUTE_IMPL(RouteSync, path, argp) @@ -137,7 +137,7 @@ ROUTE_IMPL(RouteSync, path, argp) prevBatch = HashMapGet(params, "since"); timeout = HashMapGet(params, "timeout"); filter = HashMapGet(params, "filter"); - timeoutDuration = atoi(timeout); + timeoutDuration = timeout ? atoi(timeout) : 0; if (filter && *filter != '{') { @@ -225,14 +225,14 @@ ROUTE_IMPL(RouteSync, path, argp) { /* TODO: Rename these variables */ char *roomId = ArrayGet(joins, i); + JoinedRooms joined = { 0 }; + char *firstEvent = NULL; + char *type, *key, *id; + HashMap *joinedObj; + HashMap *state; Array *el; size_t j; Room *r; - HashMap *state; - char *firstEvent = NULL; - JoinedRooms joined = { 0 }; - HashMap *joinedObj; - char *type, *key, *id; if (IsRoomFiltered(&filterData, roomId)) {