net: make port number configurable

This commit is contained in:
Thomas Schoebel-Theuer 2012-09-26 11:10:18 +02:00 committed by Thomas Schoebel-Theuer
parent 261fc98d4a
commit 08a19dae8f
3 changed files with 9 additions and 3 deletions

View File

@ -24,6 +24,14 @@ config MARS_BIGMODULE
---help---
Normally ON. Switch off only for EXPERIMENTS!
config MARS_DEFAULT_PORT
int "port number where MARS is listening"
depends on MARS
default 7777
---help---
Best practice is to uniformly use the same port number
in a cluster. Therefore, this is compiletime constant.
config MARS_MEM_RETRY
bool "make MARS memory allocation more robust"
depends on MARS

View File

@ -55,7 +55,7 @@ int mars_create_sockaddr(struct sockaddr_storage *addr, const char *spec)
memset(addr, 0, sizeof(*addr));
sockaddr->sin_family = AF_INET;
sockaddr->sin_port = htons(MARS_DEFAULT_PORT);
sockaddr->sin_port = htons(CONFIG_MARS_DEFAULT_PORT);
/* Try to translate hostnames to IPs if possible.
*/

View File

@ -8,8 +8,6 @@
#include "brick.h"
#define MARS_DEFAULT_PORT 7777
extern bool mars_net_is_alive;
/* The original struct socket has no refcount. This leads to problems