[hamradio-commits] [dump1090] 272/389: antirez
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Wed Nov 5 00:20:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch master
in repository dump1090.
commit f331887b7fb609b299dbb0eff2b2eb4a665ce0fb
Author: Malcolm Robb <Support at ATTAvionics.com>
Date: Sat Feb 22 22:20:25 2014 +0000
antirez
Constant replaced with macro MODES_NET_SERVICES_NUM.
---
dump1090.h | 1 +
net_io.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dump1090.h b/dump1090.h
index 6099c91..24d971b 100644
--- a/dump1090.h
+++ b/dump1090.h
@@ -163,6 +163,7 @@
#define MODES_INTERACTIVE_DELETE_TTL 300 // Delete from the list after 300 seconds
#define MODES_INTERACTIVE_DISPLAY_TTL 60 // Delete from display after 60 seconds
+#define MODES_NET_SERVICES_NUM 6
#define MODES_NET_MAX_FD 1024
#define MODES_NET_INPUT_RAW_PORT 30001
#define MODES_NET_OUTPUT_RAW_PORT 30002
diff --git a/net_io.c b/net_io.c
index 3c96aa6..a0a9838 100644
--- a/net_io.c
+++ b/net_io.c
@@ -51,7 +51,7 @@ void modesInitNet(void) {
char *descr;
int *socket;
int port;
- } services[6] = {
+ } services[MODES_NET_SERVICES_NUM] = {
{"Raw TCP output", &Modes.ros, Modes.net_output_raw_port},
{"Raw TCP input", &Modes.ris, Modes.net_input_raw_port},
{"Beast TCP output", &Modes.bos, Modes.net_output_beast_port},
@@ -64,7 +64,7 @@ void modesInitNet(void) {
memset(Modes.clients,0,sizeof(Modes.clients));
Modes.maxfd = -1;
- for (j = 0; j < 6; j++) {
+ for (j = 0; j < MODES_NET_SERVICES_NUM; j++) {
int s = anetTcpServer(Modes.aneterr, services[j].port, NULL);
if (s == -1) {
fprintf(stderr, "Error opening the listening port %d (%s): %s\n",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git
More information about the pkg-hamradio-commits
mailing list