aboutsummaryrefslogtreecommitdiff
path: root/bbot/tftp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/tftp.cxx')
-rw-r--r--bbot/tftp.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/bbot/tftp.cxx b/bbot/tftp.cxx
index 3304356..862a0e4 100644
--- a/bbot/tftp.cxx
+++ b/bbot/tftp.cxx
@@ -19,7 +19,7 @@ using namespace butl;
namespace bbot
{
tftp_server::
- tftp_server (const string& map)
+ tftp_server (const string& map, uint16_t port)
{
int fd (socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
@@ -34,7 +34,7 @@ namespace bbot
memset (&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl (INADDR_ANY);
- addr.sin_port = htons (0);
+ addr.sin_port = htons (port);
// Not to confuse with std::bind().
//