ConnectivityFoundry / AwaLWM2M

Awa LWM2M is an implementation of the OMA Lightweight M2M protocol in C.
BSD 3-Clause "New" or "Revised" License
102 stars 66 forks source link

Fix Contiki abstraction layer mixing different format for storing ports #347

Closed mtusnio closed 7 years ago

mtusnio commented 7 years ago

There has been some issues with observes due to the way ports were parsed. I standarised it so that ports are always passed as integers in whatever format the platform prefers, and they are converted to network format just before sending/reading. This means that until we send we do not really care about what format the ports should be saved in.

boyvinall commented 7 years ago

The reasoning here sounds good. Just doing a review for anywhere else this is used, from a cursory inspection it looks like maybe line 371 should be changed too?

mtusnio commented 7 years ago

I removed the conversion for NetworkSocket, instead now it's done when binding via udp_bind