From 984174fc9274bcbab75bd7b3eefd6023b73aa2d3 Mon Sep 17 00:00:00 2001
From: helge <helgewurst@web.de>
Date: 周二, 09 11月 2021 19:07:27 +0800
Subject: [PATCH] use ip_set_option for bit setting

---
 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 9252ba5..142adcf 100644
--- a/examples/test-LwIP-netconn/scpi_server.c
+++ b/examples/test-LwIP-netconn/scpi_server.c
@@ -253,7 +253,7 @@
         } else {
             /* connection established */
             iprintf("***Connection established %s\r\n", inet_ntoa(newconn->pcb.ip->remote_ip));
-            newconn->pcb.tcp->so_options |= SOF_KEEPALIVE;
+            ip_set_option(newconn->pcb.tcp, SOF_KEEPALIVE);
             newconn->pcb.tcp->keep_idle   = SCPI_KEEP_IDLE;  // Override TCP_KEEPIDLE_DEFAULT  for this connection.
             newconn->pcb.tcp->keep_intvl  = SCPI_KEEP_INTVL; // Override TCP_KEEPINTVL_DEFAULT for this connection.
             newconn->pcb.tcp->keep_cnt    = SCPI_KEEP_CNT;   // Override TCP_KEEPCNT_DEFAULT   for this connection.
@@ -274,7 +274,7 @@
         } else {
             /* control connection established */
             iprintf("***Control Connection established %s\r\n", inet_ntoa(newconn->pcb.ip->remote_ip));
-            newconn->pcb.tcp->so_options |= SOF_KEEPALIVE;
+            ip_set_option(newconn->pcb.tcp, SOF_KEEPALIVE);
             newconn->pcb.tcp->keep_idle   = SCPI_KEEP_IDLE;  // Override TCP_KEEPIDLE_DEFAULT  for this connection.
             newconn->pcb.tcp->keep_intvl  = SCPI_KEEP_INTVL; // Override TCP_KEEPINTVL_DEFAULT for this connection.
             newconn->pcb.tcp->keep_cnt    = SCPI_KEEP_CNT;   // Override TCP_KEEPCNT_DEFAULT   for this connection.

--
Gitblit v1.9.1