summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-11 19:38:57 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-11 19:38:57 -0400
commitbfd3904c4439680060948402ed546ffa3532be67 (patch)
tree8569e086590165b50356530aed300a81cedb070c /config.h
parent27f41f410d78403abecbaf9264d8a9abbac39f32 (diff)
Change `port` from an int to a string, and move the
valid port check into the config parser.
Diffstat (limited to 'config.h')
-rw-r--r--config.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.h b/config.h
index e461369..5ba0978 100644
--- a/config.h
+++ b/config.h
@@ -21,7 +21,7 @@ struct config {
char *git_root; /* Root of git server. */
char *sock_type; /* Type of socket. */
char *sock; /* Socket address. */
- int port; /* Listen port. */
+ char *port; /* Listen port. */
int merge_type; /* Merge type. */
char *pr_root; /* Root of pull requests. */
char *key_path; /* Path to maintainer authentication key file. */
@@ -44,7 +44,7 @@ static const config_opt config_opts[] = {
{"git-root", "Root of git server (can also be a url).", TYPE_STRING, offsetof(config, git_root)},
{"socket-type", "Socket type to use (options: unix, network. default: network).", TYPE_STRING, offsetof(config, sock_type)},
{"socket", "Path, IP address, or domain name of socket.", TYPE_STRING, offsetof(config, sock)},
- {"port", "Port to listen on (network socket only).", TYPE_INT, offsetof(config, port)},
+ {"port", "Port to listen on (network socket only).", TYPE_STRING, offsetof(config, port)},
{"merge-type", "Type of merge (options: 0 = Merge individually, 1 = Merge into one).", TYPE_INT, offsetof(config, merge_type)},
{"pr-root", "Directory to store pull requests in.", TYPE_STRING, offsetof(config, pr_root)},
{"key-file", "Path to file containing gpg/pgp public keys of each maintainer.", TYPE_STRING, offsetof(config, key_path)},