From 9afb267cd98814efbae6eed15824ea8090758bb5 Mon Sep 17 00:00:00 2001
From: helge <helgewurst@web.de>
Date: 周六, 06 11月 2021 07:05:16 +0800
Subject: [PATCH]  bug fix: change netconn_write() argument from NETCONN_NOCOPY to NETCONN_COPY

---
 examples/test-LwIP-netconn/scpi_server.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/test-LwIP-netconn/scpi_server.c b/examples/test-LwIP-netconn/scpi_server.c
index 309dd38..a12bbbc 100644
--- a/examples/test-LwIP-netconn/scpi_server.c
+++ b/examples/test-LwIP-netconn/scpi_server.c
@@ -94,7 +94,7 @@
     if (context->user_context != NULL) {
         user_data_t * u = (user_data_t *) (context->user_context);
         if (u->io) {
-            return (netconn_write(u->io, data, len, NETCONN_NOCOPY) == ERR_OK) ? len : 0;
+            return (netconn_write(u->io, data, len, NETCONN_COPY) == ERR_OK) ? len : 0;
         }
     }
     return 0;
@@ -139,7 +139,7 @@
         user_data_t * u = (user_data_t *) (context->user_context);
         if (u->control_io) {
             snprintf(b, sizeof (b), "SRQ%d\r\n", val);
-            return netconn_write(u->control_io, b, strlen(b), NETCONN_NOCOPY) == ERR_OK ? SCPI_RES_OK : SCPI_RES_ERR;
+            return netconn_write(u->control_io, b, strlen(b), NETCONN_COPY) == ERR_OK ? SCPI_RES_OK : SCPI_RES_ERR;
         }
     }
     return SCPI_RES_OK;

--
Gitblit v1.9.1