aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-server
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2024-10-05 23:23:17 +0200
committerMattias Andrée <m@maandree.se>2024-10-05 23:23:17 +0200
commit98a8ac8498974e499fc129878ab05b9a7bf8ba30 (patch)
tree2914967687516632a93da9af59818f22d3120861 /src/mds-server
parentUpdate e-mail (diff)
downloadmds-master.tar.gz
mds-master.tar.bz2
mds-master.tar.xz
misc + update e-mailHEADmaster
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--src/mds-server/client.c2
-rw-r--r--src/mds-server/client.h2
-rw-r--r--src/mds-server/globals.c2
-rw-r--r--src/mds-server/globals.h2
-rw-r--r--src/mds-server/interception-condition.c2
-rw-r--r--src/mds-server/interception-condition.h2
-rw-r--r--src/mds-server/interceptors.c8
-rw-r--r--src/mds-server/interceptors.h2
-rw-r--r--src/mds-server/mds-server.c16
-rw-r--r--src/mds-server/mds-server.h2
-rw-r--r--src/mds-server/multicast.c2
-rw-r--r--src/mds-server/multicast.h2
-rw-r--r--src/mds-server/queued-interception.c2
-rw-r--r--src/mds-server/queued-interception.h2
-rw-r--r--src/mds-server/receiving.c16
-rw-r--r--src/mds-server/receiving.h2
-rw-r--r--src/mds-server/reexec.c2
-rw-r--r--src/mds-server/sending.c4
-rw-r--r--src/mds-server/sending.h2
-rw-r--r--src/mds-server/signals.c2
-rw-r--r--src/mds-server/slavery.c2
-rw-r--r--src/mds-server/slavery.h2
22 files changed, 40 insertions, 40 deletions
diff --git a/src/mds-server/client.c b/src/mds-server/client.c
index 4122f64..dc9c57f 100644
--- a/src/mds-server/client.c
+++ b/src/mds-server/client.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-server/client.h b/src/mds-server/client.h
index b003d31..6c37ffc 100644
--- a/src/mds-server/client.h
+++ b/src/mds-server/client.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-server/globals.c b/src/mds-server/globals.c
index 774de73..5ec5ad2 100644
--- a/src/mds-server/globals.c
+++ b/src/mds-server/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-server/globals.h b/src/mds-server/globals.h
index 8083717..a9fe9b9 100644
--- a/src/mds-server/globals.h
+++ b/src/mds-server/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-server/interception-condition.c b/src/mds-server/interception-condition.c
index fecf1f0..accfdfa 100644
--- a/src/mds-server/interception-condition.c
+++ b/src/mds-server/interception-condition.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-server/interception-condition.h b/src/mds-server/interception-condition.h
index 78383f4..85858a4 100644
--- a/src/mds-server/interception-condition.h
+++ b/src/mds-server/interception-condition.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-server/interceptors.c b/src/mds-server/interceptors.c
index bcb8621..ede924d 100644
--- a/src/mds-server/interceptors.c
+++ b/src/mds-server/interceptors.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
@@ -99,7 +99,7 @@ add_intercept_condition(client_t *client, char *condition, int64_t priority, int
also look for non-modifying condition to swap position
with for optimisation. */
for (i = 0; i < n; i++) {
- if ((conds[i].header_hash != hash) || !strequals(conds[i].condition, condition)) {
+ if ((conds[i].header_hash != hash) || !streq(conds[i].condition, condition)) {
/* Look for the first non-modifying, this is a part of the
optimisation where we put all modifying conditions at the
beginning. */
@@ -186,8 +186,8 @@ is_condition_matching(interception_condition_t *cond, size_t *hashes,
if (*cond->condition == '\0')
return 1;
else if ((cond->header_hash == hashes[i]) &&
- (strequals(cond->condition, keys[i]) ||
- strequals(cond->condition, headers[i])))
+ (streq(cond->condition, keys[i]) ||
+ streq(cond->condition, headers[i])))
return 1;
}
return 0;
diff --git a/src/mds-server/interceptors.h b/src/mds-server/interceptors.h
index 21f74d4..84cdc55 100644
--- a/src/mds-server/interceptors.h
+++ b/src/mds-server/interceptors.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-server/mds-server.c b/src/mds-server/mds-server.c
index 58908a4..6ee2e81 100644
--- a/src/mds-server/mds-server.c
+++ b/src/mds-server/mds-server.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
@@ -98,14 +98,14 @@ preinitialise_server(void)
/* Parse command line arguments. */
for (i = 1; i < argc; i++) {
arg = argv[i];
- if (startswith(arg, "--socket-fd=")) { /* Socket file descriptor. */
+ if (strstarts(arg, "--socket-fd=")) { /* Socket file descriptor. */
exit_if (socket_fd != -1,
eprintf("duplicate declaration of %s.", "--socket-fd"););
exit_if (strict_atoi(arg += strlen("--socket-fd="), &socket_fd, 0, INT_MAX) < 0,
eprintf("invalid value for %s: %s.", "--socket-fd", arg););
- } else if (startswith(arg, "--alarm=")) { /* Schedule an alarm signal for forced abort. */
- alarm((unsigned)min(atou(arg + strlen("--alarm=")), 60)); /* At most 1 minute. */
- } else if (!strequals(arg, "--initial-spawn") && !strequals(arg, "--respawn")) {
+ } else if (strstarts(arg, "--alarm=")) { /* Schedule an alarm signal for forced abort. */
+ alarm((unsigned)MIN(atou(arg + strlen("--alarm=")), 60)); /* At most 1 minute. */
+ } else if (!streq(arg, "--initial-spawn") && !streq(arg, "--respawn")) {
/* Not recognised, it is probably for another server. */
unparsed_args[unparsed_args_ptr++] = arg;
}
@@ -523,11 +523,11 @@ run_initrc(char **args)
(xsnprintf(pathname, FORMAT, __VA_ARGS__), execv(args[0], args))
/* Test $XDG_CONFIG_HOME. */
- if ((env = getenv_nonempty("XDG_CONFIG_HOME")))
+ if ((env = getenv_ne("XDG_CONFIG_HOME")))
__exec("%s/%s", env, INITRC_FILE);
/* Test $HOME. */
- if ((env = getenv_nonempty("HOME"))) {
+ if ((env = getenv_ne("HOME"))) {
__exec("%s/.config/%s", env, INITRC_FILE);
__exec("%s/.%s", env, INITRC_FILE);
}
@@ -543,7 +543,7 @@ run_initrc(char **args)
}
/* Test $XDG_CONFIG_DIRS. */
- if ((env = getenv_nonempty("XDG_CONFIG_DIRS"))) {
+ if ((env = getenv_ne("XDG_CONFIG_DIRS"))) {
for (begin = env;;) {
end = strchrnul(begin, ':');
len = (int)(end - begin);
diff --git a/src/mds-server/mds-server.h b/src/mds-server/mds-server.h
index c1263e4..f7a7667 100644
--- a/src/mds-server/mds-server.h
+++ b/src/mds-server/mds-server.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-server/multicast.c b/src/mds-server/multicast.c
index 5095471..6870f47 100644
--- a/src/mds-server/multicast.c
+++ b/src/mds-server/multicast.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-server/multicast.h b/src/mds-server/multicast.h
index 126c4ba..c1b078a 100644
--- a/src/mds-server/multicast.h
+++ b/src/mds-server/multicast.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-server/queued-interception.c b/src/mds-server/queued-interception.c
index afa6c65..c266fac 100644
--- a/src/mds-server/queued-interception.c
+++ b/src/mds-server/queued-interception.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-server/queued-interception.h b/src/mds-server/queued-interception.h
index 1555801..84df386 100644
--- a/src/mds-server/queued-interception.h
+++ b/src/mds-server/queued-interception.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-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);
}
diff --git a/src/mds-server/receiving.h b/src/mds-server/receiving.h
index 03542eb..98ed7fa 100644
--- a/src/mds-server/receiving.h
+++ b/src/mds-server/receiving.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-server/reexec.c b/src/mds-server/reexec.c
index 0dcfa44..b3f1384 100644
--- a/src/mds-server/reexec.c
+++ b/src/mds-server/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-server/sending.c b/src/mds-server/sending.c
index 95123eb..5b91b01 100644
--- a/src/mds-server/sending.c
+++ b/src/mds-server/sending.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
@@ -175,7 +175,7 @@ void multicast_message(multicast_t *multicast)
/* Act upon the reply. */
mod = client->modify_message;
for (i = 0; i < mod->header_count; i++) {
- if (strequals(mod->headers[i], "Modify: yes")) {
+ if (streq(mod->headers[i], "Modify: yes")) {
modifying = 1;
consumed = mod->payload_size == 0;
break;
diff --git a/src/mds-server/sending.h b/src/mds-server/sending.h
index ef2b330..eb72486 100644
--- a/src/mds-server/sending.h
+++ b/src/mds-server/sending.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-server/signals.c b/src/mds-server/signals.c
index cc86b75..3ace64c 100644
--- a/src/mds-server/signals.c
+++ b/src/mds-server/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-server/slavery.c b/src/mds-server/slavery.c
index ddbfc8c..b106947 100644
--- a/src/mds-server/slavery.c
+++ b/src/mds-server/slavery.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-server/slavery.h b/src/mds-server/slavery.h
index 89586aa..68834b0 100644
--- a/src/mds-server/slavery.h
+++ b/src/mds-server/slavery.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