Skip to content

Commit

Permalink
Add a special handling for fs_manifest rule
Browse files Browse the repository at this point in the history
Some servers return fs_manifest key-value pair, which has it's value
split by newline, followed by a space. qstat breaks on such servers (at
least, it can't fetch the rules and players, because it treats newline
as beginning of player data, an unexpected data causes qstat to break
with error).

Following patch makes special handling for fs_manifest key, that doesn't
treat newline as a separator, while keeping all other parsing intact.

Signed-off-by: Vitaly Ostrosablin <tmp6154@yandex.ru>
  • Loading branch information
ostrosablin committed Mar 6, 2022
1 parent 546fed9 commit 4f70920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -6453,7 +6453,7 @@ deal_with_q2_packet(struct qserver *server, char *rawpkt, int pktlen)
pkt += strlen(key) + 1;

// Find the value
end = strpbrk(pkt, "\\\n");
end = strpbrk(pkt, strcmp(key, "fs_manifest") ? "\\\n" : "\\");
if (NULL == end) {
// Last value
end = rawpkt + pktlen;
Expand Down

0 comments on commit 4f70920

Please sign in to comment.