mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:53:33 +03:00
tests/server: round of tidy-ups
Dedupe, merge macros, globals, make symbols local where possible. Drop unused macros and headers. Drop `DEFAULT_LOGFILE` macro in favour of `--logfile` command-line option. Ref: #15000 Closes #16525
This commit is contained in:
parent
387311012c
commit
9213e4e497
9 changed files with 66 additions and 137 deletions
|
|
@ -85,17 +85,8 @@
|
|||
/* include memdebug.h last */
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
#undef EINTR
|
||||
#define EINTR 4 /* errno.h value */
|
||||
#endif
|
||||
|
||||
#define DEFAULT_PORT 8905
|
||||
|
||||
#ifndef DEFAULT_LOGFILE
|
||||
#define DEFAULT_LOGFILE "log/socksd.log"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_REQFILE
|
||||
#define DEFAULT_REQFILE "log/socksd-request.log"
|
||||
#endif
|
||||
|
|
@ -134,7 +125,6 @@ struct configurable {
|
|||
|
||||
static struct configurable config;
|
||||
|
||||
const char *serverlogfile = DEFAULT_LOGFILE;
|
||||
static const char *reqlogfile = DEFAULT_REQFILE;
|
||||
static const char *configfile = DEFAULT_CONFIG;
|
||||
|
||||
|
|
@ -979,6 +969,8 @@ int main(int argc, char *argv[])
|
|||
bool unlink_socket = false;
|
||||
#endif
|
||||
|
||||
serverlogfile = "log/socksd.log";
|
||||
|
||||
while(argc > arg) {
|
||||
if(!strcmp("--version", argv[arg])) {
|
||||
printf("socksd IPv4%s\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue