You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/08/17 00:41:30 UTC

[GitHub] [incubator-nuttx-apps] SPRESENSE commented on a change in pull request #346: Update wget

SPRESENSE commented on a change in pull request #346:
URL: https://github.com/apache/incubator-nuttx-apps/pull/346#discussion_r471182083



##########
File path: netutils/webclient/webclient.c
##########
@@ -658,12 +658,18 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
 
       len = dest - buffer;
 
-      ret = send(sockfd, buffer, len, 0);
-      if (ret < 0)
+      do
         {
-          nerr("ERROR: send failed: %d\n", errno);
-          goto errout;
+          ret = send(sockfd, buffer + ((dest - buffer) - len), len, 0);
+          if (ret < 0)
+            {
+              nerr("ERROR: send failed: %d\n", errno);
+              goto errout;
+            }
+
+          len -= ret;
         }
+      while (len > 0);

Review comment:
       Yes.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org