Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet mbed_nsp_endpoint_nxp
Diff: NSPTransport.cpp
- Revision:
- 22:0f2a0269ce6d
- Parent:
- 6:edf306673e54
- Child:
- 28:b6a7959c8be0
diff -r 272df0444756 -r 0f2a0269ce6d NSPTransport.cpp
--- a/NSPTransport.cpp Tue Jul 01 19:29:55 2014 +0000
+++ b/NSPTransport.cpp Wed Jul 02 20:17:30 2014 +0000
@@ -52,16 +52,15 @@
// connect up NSP
bool NSPTransport::connect() {
if (!this->m_connected) {
- // get our NSP address
+ // get our endpoint
MBEDEndpoint *endpoint = (MBEDEndpoint *)this->logger()->getEndpoint();
- char *nsp_address = endpoint->getNSPAddress();
// bind to the NSP
- server.bind(NSP_PORT);
- nsp.set_address(nsp_address,NSP_PORT);
+ server.bind(endpoint->getNSPPort());
+ nsp.set_address((char *)endpoint->getNSPAddress(),(int)endpoint->getNSPPort());
// DEBUG
- this->logger()->log("Connecting... NSP IP Address: %s Port: %d", nsp_address, NSP_PORT);
+ this->logger()->log("Connecting... NSP: %s:%d",endpoint->getNSPAddress(),endpoint->getNSPPort());
// Initialize NSDL stack
nsdl_init();