summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichele papalini <micpapal@cisco.com>2019-02-19 17:51:28 +0100
committermichele papalini <micpapal@cisco.com>2019-02-19 17:51:28 +0100
commit7734174f81412b1544243d1d358ee2641dcdb3dd (patch)
treecd7a14d8dcdfebd079e421a63b523d4f8cac6ea3
parent286fd55fc0cf620747209570a32b79d97d50d9b4 (diff)
[HICN-70] remove double htons in addListener
Change-Id: Iaf65c52ec45c737f3bb6cc85a66c0f1521921e5f Signed-off-by: michele papalini <micpapal@cisco.com>
-rw-r--r--hicn-light/src/config/configurationListeners.c2
-rw-r--r--hicn-light/src/config/controlAddListener.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hicn-light/src/config/configurationListeners.c b/hicn-light/src/config/configurationListeners.c
index 11276e2dd..6539e8c9f 100644
--- a/hicn-light/src/config/configurationListeners.c
+++ b/hicn-light/src/config/configurationListeners.c
@@ -524,7 +524,7 @@ void configurationListeners_SetupAll(const Configuration *config, uint16_t port,
// Do not start on link address
if (addressGetType(address) != ADDR_LINK) {
- _setupListenersOnAddress(forwarder, address, htons(port),
+ _setupListenersOnAddress(forwarder, address, port,
interfaceGetName(iface));
}
}
diff --git a/hicn-light/src/config/controlAddListener.c b/hicn-light/src/config/controlAddListener.c
index 2cabfd035..03900a861 100644
--- a/hicn-light/src/config/controlAddListener.c
+++ b/hicn-light/src/config/controlAddListener.c
@@ -111,7 +111,7 @@ static CommandReturn _CreateListener(CommandParser *parser, CommandOps *ops,
// Fill remaining payload fields
addListenerCommand->listenerMode = mode;
addListenerCommand->connectionType = type;
- addListenerCommand->port = htons((uint16_t)atoi(port));
+ addListenerCommand->port = (uint16_t)atoi(port);
strcpy(addListenerCommand->symbolic, symbolic);
// send message and receive response