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-registry | |
parent | Update e-mail (diff) | |
download | mds-master.tar.gz mds-master.tar.bz2 mds-master.tar.xz |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/mds-registry')
-rw-r--r-- | src/mds-registry/globals.c | 2 | ||||
-rw-r--r-- | src/mds-registry/globals.h | 2 | ||||
-rw-r--r-- | src/mds-registry/mds-registry.c | 2 | ||||
-rw-r--r-- | src/mds-registry/mds-registry.h | 2 | ||||
-rw-r--r-- | src/mds-registry/reexec.c | 2 | ||||
-rw-r--r-- | src/mds-registry/reexec.h | 2 | ||||
-rw-r--r-- | src/mds-registry/registry.c | 20 | ||||
-rw-r--r-- | src/mds-registry/registry.h | 2 | ||||
-rw-r--r-- | src/mds-registry/signals.c | 2 | ||||
-rw-r--r-- | src/mds-registry/signals.h | 2 | ||||
-rw-r--r-- | src/mds-registry/slave.c | 4 | ||||
-rw-r--r-- | src/mds-registry/slave.h | 2 | ||||
-rw-r--r-- | src/mds-registry/util.c | 2 | ||||
-rw-r--r-- | src/mds-registry/util.h | 2 |
14 files changed, 24 insertions, 24 deletions
diff --git a/src/mds-registry/globals.c b/src/mds-registry/globals.c index 590248e..58a6359 100644 --- a/src/mds-registry/globals.c +++ b/src/mds-registry/globals.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 diff --git a/src/mds-registry/globals.h b/src/mds-registry/globals.h index 1f0107b..8e1b005 100644 --- a/src/mds-registry/globals.h +++ b/src/mds-registry/globals.h @@ -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 diff --git a/src/mds-registry/mds-registry.c b/src/mds-registry/mds-registry.c index 3d17247..1497ac4 100644 --- a/src/mds-registry/mds-registry.c +++ b/src/mds-registry/mds-registry.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 diff --git a/src/mds-registry/mds-registry.h b/src/mds-registry/mds-registry.h index 484731a..d901dfa 100644 --- a/src/mds-registry/mds-registry.h +++ b/src/mds-registry/mds-registry.h @@ -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 diff --git a/src/mds-registry/reexec.c b/src/mds-registry/reexec.c index b6c45e0..a04ab61 100644 --- a/src/mds-registry/reexec.c +++ b/src/mds-registry/reexec.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 diff --git a/src/mds-registry/reexec.h b/src/mds-registry/reexec.h index 423afe4..89a6eec 100644 --- a/src/mds-registry/reexec.h +++ b/src/mds-registry/reexec.h @@ -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 diff --git a/src/mds-registry/registry.c b/src/mds-registry/registry.c index 0c4d5a5..3b00834 100644 --- a/src/mds-registry/registry.c +++ b/src/mds-registry/registry.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 @@ -72,7 +72,7 @@ handle_close_message(void) /* Remove server for all protocols. */ for (i = 0; i < received.header_count; i++) { - if (startswith(received.headers[i], "Client closed: ")) { + if (strstarts(received.headers[i], "Client closed: ")) { client = parse_client_id(received.headers[i] + strlen("Client closed: ")); foreach_hash_table_entry (reg_table, j, entry) { @@ -409,7 +409,7 @@ handle_register_message(void) size_t i, length = 0; #define __get_header(storage, header)\ - (startswith(received.headers[i], header))\ + (strstarts(received.headers[i], header))\ storage = received.headers[i] + strlen(header) for (i = 0; i < received.header_count; i++) { @@ -428,11 +428,11 @@ handle_register_message(void) #undef __get_header /* Validate headers. */ - if (!recv_client_id || strequals(recv_client_id, "0:0")) + if (!recv_client_id || streq(recv_client_id, "0:0")) return eprint("received message from anonymous sender, ignoring."), 0; else if (!strchr(recv_client_id, ':')) return eprint("received message from sender without a colon it its ID, ignoring, invalid ID."), 0; - else if (!recv_length && (!recv_action || !strequals(recv_action, "list"))) + else if (!recv_length && (!recv_action || !streq(recv_action, "list"))) return eprint("received empty message without `Action: list`, ignoring, has no effect."), 0; else if (!recv_message_id) return eprint("received message without ID, ignoring, master server is misbehaving."), 0; @@ -446,10 +446,10 @@ handle_register_message(void) /* Perform action. */ #define __registry_action(action) registry_action(length, action, recv_client_id, recv_message_id) - if (strequals(recv_action, "add")) return __registry_action(1); - else if (strequals(recv_action, "remove")) return __registry_action(-1); - else if (strequals(recv_action, "wait")) return __registry_action(0); - else if (strequals(recv_action, "list")) return list_registry(recv_client_id, recv_message_id); + if (streq(recv_action, "add")) return __registry_action(1); + else if (streq(recv_action, "remove")) return __registry_action(-1); + else if (streq(recv_action, "wait")) return __registry_action(0); + else if (streq(recv_action, "list")) return list_registry(recv_client_id, recv_message_id); else { eprint("received invalid action, ignoring."); return 0; @@ -470,7 +470,7 @@ handle_message(void) { size_t i; for (i = 0; i < received.header_count; i++) { - if (strequals(received.headers[i], "Command: register")) { + if (streq(received.headers[i], "Command: register")) { fail_if (handle_register_message()); return 0; } diff --git a/src/mds-registry/registry.h b/src/mds-registry/registry.h index e88afde..f2f92a2 100644 --- a/src/mds-registry/registry.h +++ b/src/mds-registry/registry.h @@ -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 diff --git a/src/mds-registry/signals.c b/src/mds-registry/signals.c index 8fb90dd..20f0f0f 100644 --- a/src/mds-registry/signals.c +++ b/src/mds-registry/signals.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 diff --git a/src/mds-registry/signals.h b/src/mds-registry/signals.h index dc899f6..d868003 100644 --- a/src/mds-registry/signals.h +++ b/src/mds-registry/signals.h @@ -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 diff --git a/src/mds-registry/slave.c b/src/mds-registry/slave.c index 4639393..daf156a 100644 --- a/src/mds-registry/slave.c +++ b/src/mds-registry/slave.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 @@ -183,7 +183,7 @@ start_slave(hash_table_t *restrict wait_set, const char *restrict recv_client_id fail_if (slave->node == LINKED_LIST_UNUSED); for (i = 0; i < received.header_count; i++) { - if (startswith(received.headers[i], "Time to live: ")) { + if (strstarts(received.headers[i], "Time to live: ")) { ttl = received.headers[i] + strlen("Time to live: "); slave->timed = 1; fail_if (monotone(&(slave->dethklok))); diff --git a/src/mds-registry/slave.h b/src/mds-registry/slave.h index 0b4f7b2..defe845 100644 --- a/src/mds-registry/slave.h +++ b/src/mds-registry/slave.h @@ -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 diff --git a/src/mds-registry/util.c b/src/mds-registry/util.c index 77dff5a..c37d102 100644 --- a/src/mds-registry/util.c +++ b/src/mds-registry/util.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 diff --git a/src/mds-registry/util.h b/src/mds-registry/util.h index 4547400..d948fce 100644 --- a/src/mds-registry/util.h +++ b/src/mds-registry/util.h @@ -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 |