mirror of https://github.com/ARMmbed/mbed-os.git
Change cellular socket port 0 to dynamic range
parent
934a93151a
commit
065326135e
|
|
@ -131,7 +131,7 @@ public: // CellularDevice
|
|||
*
|
||||
* @return network stack
|
||||
*/
|
||||
NetworkStack *get_stack();
|
||||
virtual NetworkStack *get_stack();
|
||||
|
||||
protected:
|
||||
AT_CellularNetwork *_network;
|
||||
|
|
|
|||
|
|
@ -173,6 +173,10 @@ nsapi_error_t AT_CellularStack::socket_bind(nsapi_socket_t handle, const SocketA
|
|||
}
|
||||
socket->localAddress = addr;
|
||||
|
||||
if (socket->localAddress.get_port() == 0) {
|
||||
socket->localAddress.set_port(get_dynamic_ip_port());
|
||||
}
|
||||
|
||||
_at.lock();
|
||||
|
||||
if (!socket->created) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue