diff options
author | Mattias Andrée <m@maandree.se> | 2024-10-05 23:23:17 +0200 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2024-10-05 23:23:17 +0200 |
commit | 98a8ac8498974e499fc129878ab05b9a7bf8ba30 (patch) | |
tree | 2914967687516632a93da9af59818f22d3120861 /src/mds-server/receiving.c | |
parent | Update e-mail (diff) | |
download | mds-98a8ac8498974e499fc129878ab05b9a7bf8ba30.tar.gz mds-98a8ac8498974e499fc129878ab05b9a7bf8ba30.tar.bz2 mds-98a8ac8498974e499fc129878ab05b9a7bf8ba30.tar.xz |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/mds-server/receiving.c')
-rw-r--r-- | src/mds-server/receiving.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mds-server/receiving.c b/src/mds-server/receiving.c index 60e86b7..3f7e9ce 100644 --- a/src/mds-server/receiving.c +++ b/src/mds-server/receiving.c @@ -1,6 +1,6 @@ /** * mds — A micro-display server - * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (maandree@kth.se) + * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (m@maandree.se) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -249,13 +249,13 @@ message_received(client_t *client) /* Parser headers. */ for (i = 0; i < message.header_count; i++) { h = message.headers[i]; - if (strequals(h, "Command: assign-id")) assign_id = 1; - else if (strequals(h, "Command: intercept")) intercept = 1; - else if (strequals(h, "Modifying: yes")) modifying = 1; - else if (strequals(h, "Stop: yes")) stop = 1; - else if (startswith(h, "Message ID: ")) message_id = strstr(h, ": ") + 2; - else if (startswith(h, "Priority: ")) priority = ato64(strstr(h, ": ") + 2); - else if (startswith(h, "Modify ID: ")) modify_id = atou64(strstr(h, ": ") + 2); + if (streq(h, "Command: assign-id")) assign_id = 1; + else if (streq(h, "Command: intercept")) intercept = 1; + else if (streq(h, "Modifying: yes")) modifying = 1; + else if (streq(h, "Stop: yes")) stop = 1; + else if (strstarts(h, "Message ID: ")) message_id = strstr(h, ": ") + 2; + else if (strstarts(h, "Priority: ")) priority = ato64(strstr(h, ": ") + 2); + else if (strstarts(h, "Modify ID: ")) modify_id = atou64(strstr(h, ": ") + 2); } |