From 664160e0cc7f7722547bf748b4077e250578d1e9 Mon Sep 17 00:00:00 2001 From: angt Date: Tue, 1 Mar 2016 15:11:16 +0000 Subject: [PATCH] Add bind-port option --- mud | 2 +- src/main.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mud b/mud index a1ce474..fc8e97c 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit a1ce4740b44e52c2fa37f9aaa8760f97636d7441 +Subproject commit fc8e97caef75ef4aa2ff5d7be4e5cf2ddfc55f75 diff --git a/src/main.c b/src/main.c index cf59838..c1343ce 100644 --- a/src/main.c +++ b/src/main.c @@ -235,6 +235,7 @@ int main (int argc, char **argv) char *host = NULL; char *port = "5000"; char *bind_list = NULL; + char *bind_port = "5000"; char *dev = NULL; char *keyfile = NULL; char *statefile = NULL; @@ -245,6 +246,7 @@ int main (int argc, char **argv) { "host", &host, option_str }, { "port", &port, option_str }, { "bind", &bind_list, option_str }, + { "bind-port", &bind_port, option_str }, { "dev", &dev, option_str }, { "keyfile", &keyfile, option_str }, { "multiqueue", NULL, option_option }, @@ -299,13 +301,15 @@ int main (int argc, char **argv) if (gt_setup_secretkey(keyfile)) return 1; - struct mud *mud = mud_create(gt.key, sizeof(gt.key)); + struct mud *mud = mud_create(bind_port); if (!mud) { gt_log("couldn't create mud\n"); return 1; } + mud_set_key(mud, gt.key, sizeof(gt.key)); + if (bind_list) { char tmp[1024]; char *name = &tmp[0];