: bharatvaj/forwarder

commit 9a45645ab6dd19ee659b256990a23500a0ec703a
parent cb526d9979f3a9e40ad9f122a3f86706401d27db
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date: Wed, 27 Mar 2019 00:21:15 +0530

Removed ports from define
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/include/device/IPDevice.hpp b/include/device/IPDevice.hpp
@@ -13,8 +13,6 @@
 
 #include <device/Device.hpp>
 
-#define W_DEFAULT_PORT 2500
-
 namespace wa {
 class IPDevice : Device {
 private:
diff --git a/include/network/IP.hpp b/include/network/IP.hpp
@@ -15,9 +15,6 @@
 #include <model/NetworkInfo.hpp>
 #include <network/Network.hpp>
 
-// TODO update value based on the hardware using cmake
-#define W_DEFAULT_PORT 21
-
 using namespace std;
 
 namespace wa {

@@ -47,7 +44,7 @@ public:
 	  cout << "IP listening" << endl;
     struct sockaddr_in peer;
     socklen_t peerLen = sizeof(peer);
-    comm_socket fd = comm_start_server(W_DEFAULT_PORT);
+    comm_socket fd = comm_start_server(2500);
     if(fd < 0){
 	    cout << "Socket error" << endl;
     }

@@ -69,7 +66,7 @@ public:
   int addDevice(std::string ipaddress) { return -1; }
 
   Device *connect(std::string conParams) override {
-    comm_socket fd = ::comm_connect_server(conParams.c_str(), W_DEFAULT_PORT);
+    comm_socket fd = ::comm_connect_server(conParams.c_str(), 21);
     if (fd == SOCKET_ERROR) {
       return nullptr;
     }
diff --git a/include/network/ZWave.hpp b/include/network/ZWave.hpp
@@ -18,9 +18,6 @@
 #include <comm.h>
 #include <model/NetworkInfo.hpp>
 
-// TODO update value based on the hardware using cmake
-#define W_DEFAULT_PORT 2500
-
 using namespace std;
 
 namespace wa {