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.
Fork of GPRSInterface by
Revision 4:1142bdd07989, committed 2014-02-27
- Comitter:
- lawliet
- Date:
- Thu Feb 27 07:25:20 2014 +0000
- Parent:
- 3:acf2ea413e72
- Child:
- 5:c4db857fb1be
- Commit message:
- version 1.2 (fix some errors)
Changed in this revision
| GPRS/GPRS.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Socket/TCPSocketConnection.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/GPRS/GPRS.cpp Wed Feb 26 09:12:46 2014 +0000
+++ b/GPRS/GPRS.cpp Thu Feb 27 07:25:20 2014 +0000
@@ -173,7 +173,7 @@
if (is_connected(socket) == false) {
return true;
}
- snprintf(cmd, sizeof(cmd),"AT+CIPCOLSE=%d\r\n",socket);
+ snprintf(cmd, sizeof(cmd),"AT+CIPCLOSE=%d\r\n",socket);
snprintf(resp,sizeof(resp),"%d, CLOSE OK",socket);
if(0 != sendCmdAndWaitForResp(cmd, resp, DEFAULT_TIMEOUT,CMD)) {
return false;
--- a/Socket/TCPSocketConnection.cpp Wed Feb 26 09:12:46 2014 +0000
+++ b/Socket/TCPSocketConnection.cpp Thu Feb 27 07:25:20 2014 +0000
@@ -81,7 +81,7 @@
}
#endif
int size = gprs->wait_readable(_sock_fd, DEFAULT_TIMEOUT);
- return gprs->recv(_sock_fd, data, size);
+ return gprs->recv(_sock_fd, data, size>length?length:size);
}
int TCPSocketConnection::receive_all(char* data, int length)