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
|
* @return network stack
|
||||||
*/
|
*/
|
||||||
NetworkStack *get_stack();
|
virtual NetworkStack *get_stack();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AT_CellularNetwork *_network;
|
AT_CellularNetwork *_network;
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,10 @@ nsapi_error_t AT_CellularStack::socket_bind(nsapi_socket_t handle, const SocketA
|
||||||
}
|
}
|
||||||
socket->localAddress = addr;
|
socket->localAddress = addr;
|
||||||
|
|
||||||
|
if (socket->localAddress.get_port() == 0) {
|
||||||
|
socket->localAddress.set_port(get_dynamic_ip_port());
|
||||||
|
}
|
||||||
|
|
||||||
_at.lock();
|
_at.lock();
|
||||||
|
|
||||||
if (!socket->created) {
|
if (!socket->created) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue