Skip to content

Commit

Permalink
GBASESERVERPORT shouldn't be a string in the config header.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 30, 2008
1 parent 2c7d5ea commit 8c83fec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion nph-offload.c
Expand Up @@ -95,6 +95,11 @@

#include "offload_server_config.h"

#define OFFLOAD_NUMSTR2(x) #x
#define OFFLOAD_NUMSTR(x) OFFLOAD_NUMSTR2(x)

#define GBASESERVERPORTSTR OFFLOAD_NUMSTR(GBASESERVERPORT)

#ifdef __GNUC__
#define ISPRINTF(x,y) __attribute__((format (printf, x, y)))
#else
Expand Down Expand Up @@ -919,7 +924,7 @@ static int doHttp(const char *method, list **headers)
hints.ai_flags = AI_NUMERICSERV | AI_V4MAPPED | AI_ADDRCONFIG;

struct addrinfo *dns = NULL;
if ((rc = getaddrinfo(GBASESERVER, GBASESERVERPORT, &hints, &dns)) != 0)
if ((rc = getaddrinfo(GBASESERVER, GBASESERVERPORTSTR, &hints, &dns)) != 0)
{
debugEcho("getaddrinfo failure: %s", gai_strerror(rc));
failure("503 Service Unavailable", "Offload base server hostname lookup failure.");
Expand Down
3 changes: 1 addition & 2 deletions offload_server_config.h
Expand Up @@ -19,9 +19,8 @@
#endif

// This is the port on the base server to connect to (default for HTTP is 80).
// This is a literal string, not a number! Put it in quotes.
#ifndef GBASESERVERPORT
#define GBASESERVERPORT "80"
#define GBASESERVERPORT 80
#endif

// Time in seconds that i/o (to base server or client) should timeout in
Expand Down

0 comments on commit 8c83fec

Please sign in to comment.