From b6e25b286c553ac1f971f3c8e0a736f9e731d2b7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 7 Mar 2018 19:45:09 +0100 Subject: [PATCH] Move MAX_HOSTLEN from server.h to net.h. This generic networking-related constant does not belong to server.h. However, since server.h uses the constant, we have to make sure that net.h is included before server.h. --- afs.c | 2 +- command.c | 2 +- dccp_send.c | 2 +- http_send.c | 2 +- net.h | 3 +++ server.c | 2 +- server.h | 4 ---- udp_send.c | 2 +- vss.c | 2 +- 9 files changed, 10 insertions(+), 11 deletions(-) diff --git a/afs.c b/afs.c index c2d5e7af..a5f86f9b 100644 --- a/afs.c +++ b/afs.c @@ -22,8 +22,8 @@ #include "string.h" #include "afh.h" #include "afs.h" -#include "server.h" #include "net.h" +#include "server.h" #include "ipc.h" #include "list.h" #include "sched.h" diff --git a/command.c b/command.c index cba2afb4..6568b789 100644 --- a/command.c +++ b/command.c @@ -22,12 +22,12 @@ #include "string.h" #include "afh.h" #include "afs.h" +#include "net.h" #include "server.h" #include "list.h" #include "send.h" #include "sched.h" #include "vss.h" -#include "net.h" #include "daemon.h" #include "fd.h" #include "ipc.h" diff --git a/dccp_send.c b/dccp_send.c index ac2da410..69ba65f5 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -21,8 +21,8 @@ #include "error.h" #include "string.h" #include "afh.h" -#include "server.h" #include "net.h" +#include "server.h" #include "list.h" #include "send.h" #include "sched.h" diff --git a/http_send.c b/http_send.c index d692c2d2..210f85ac 100644 --- a/http_send.c +++ b/http_send.c @@ -16,6 +16,7 @@ #include "error.h" #include "string.h" #include "afh.h" +#include "net.h" #include "server.h" #include "http.h" #include "list.h" @@ -23,7 +24,6 @@ #include "sched.h" #include "vss.h" #include "close_on_fork.h" -#include "net.h" #include "fd.h" #include "chunk_queue.h" #include "acl.h" diff --git a/net.h b/net.h index c5157799..143fb812 100644 --- a/net.h +++ b/net.h @@ -48,6 +48,9 @@ #define DCCP_SOCKOPT_TX_CCID 14 /**< Set/get the TX CCID. */ #endif +/** The maximum length of the host component in an URL. */ +#define MAX_HOSTLEN 256 + /** * Flowopts: Transport-layer independent encapsulation of socket options * that need to be registered prior to setting up a connection. diff --git a/server.c b/server.c index e9c1f12e..66c93ab2 100644 --- a/server.c +++ b/server.c @@ -45,6 +45,7 @@ #include "afh.h" #include "string.h" #include "afs.h" +#include "net.h" #include "server.h" #include "list.h" #include "send.h" @@ -52,7 +53,6 @@ #include "vss.h" #include "config.h" #include "close_on_fork.h" -#include "net.h" #include "daemon.h" #include "ipc.h" #include "fd.h" diff --git a/server.h b/server.h index 1852dd50..988a98d8 100644 --- a/server.h +++ b/server.h @@ -5,10 +5,6 @@ /** Size of the selector_info and audio_file info strings of struct misc_meta_data. */ #define MMD_INFO_SIZE 16384 -/** The maximum length of the host component in an URL */ -#define MAX_HOSTLEN 256 - - /** Arguments for the sender command. */ struct sender_command_data { /** Greater than zero indicates that a sender cmd is already queued. */ diff --git a/udp_send.c b/udp_send.c index 49c17631..38d49e3e 100644 --- a/udp_send.c +++ b/udp_send.c @@ -18,13 +18,13 @@ #include "error.h" #include "string.h" #include "afh.h" +#include "net.h" #include "server.h" #include "list.h" #include "send.h" #include "sched.h" #include "vss.h" #include "portable_io.h" -#include "net.h" #include "fd.h" #include "close_on_fork.h" diff --git a/vss.c b/vss.c index f69225ea..13a8e25f 100644 --- a/vss.c +++ b/vss.c @@ -25,8 +25,8 @@ #include "string.h" #include "afh.h" #include "afs.h" -#include "server.h" #include "net.h" +#include "server.h" #include "list.h" #include "send.h" #include "sched.h" -- 2.39.2