Mansi Agarwal / NSAPITests_mansi

Fork of NSAPITests by NetworkSocketAPI

Files at this revision

API Documentation at this revision

Comitter:
mansiag
Date:
Tue Sep 06 10:42:11 2016 +0000
Parent:
12:152ae238ddc1
Commit message:
Updating the address of test_buffer passed to tcp->recv function.

Changed in this revision

NSAPITests.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/NSAPITests.cpp	Mon Jun 06 08:42:21 2016 +0000
+++ b/NSAPITests.cpp	Tue Sep 06 10:42:11 2016 +0000
@@ -123,7 +123,7 @@
     }
 
     for (total = 0; total < size;) {
-        int ret = tcp->recv(test_buffer, sizeof test_buffer);
+        int ret = tcp->recv(test_buffer+total, sizeof test_buffer);
 
         if (ret < 0) {
             printf("error: 'recv(buffer, %d)' failed during test with code %d\r\n", sizeof test_buffer, ret);
@@ -188,7 +188,7 @@
 
  
     for (total = 0; total < size;) {
-        ret = tcp->recv(test_buffer, sizeof test_buffer);
+        ret = tcp->recv(test_buffer+total, sizeof test_buffer);
 
         if (ret == NSAPI_ERROR_WOULD_BLOCK) {
             continue;