diff options
-rw-r--r-- | samples/net/dns_client/src/netz.c | 3 | ||||
-rw-r--r-- | samples/net/mbedtls_sslclient/src/tcp.c | 1 | ||||
-rw-r--r-- | samples/net/nats_clients/publisher/src/netz.c | 3 | ||||
-rw-r--r-- | samples/net/paho_mqtt_clients/publisher/src/netz.c | 3 |
4 files changed, 3 insertions, 7 deletions
diff --git a/samples/net/dns_client/src/netz.c b/samples/net/dns_client/src/netz.c index b57932b22..b555fa85e 100644 --- a/samples/net/dns_client/src/netz.c +++ b/samples/net/dns_client/src/netz.c @@ -151,7 +151,6 @@ static int tcp_tx(struct net_context *ctx, uint8_t *buf, size_t size, rc = net_send(nbuf); if (rc >= 0) { - ip_buf_unref(nbuf); return 0; } switch (rc) { @@ -168,7 +167,7 @@ static int tcp_tx(struct net_context *ctx, uint8_t *buf, size_t size, } } while (1); - return 0; + return -EIO; } static int tcp_rx(struct net_context *ctx, uint8_t *buf, size_t *read_bytes, diff --git a/samples/net/mbedtls_sslclient/src/tcp.c b/samples/net/mbedtls_sslclient/src/tcp.c index b5314ef53..4aeaf418d 100644 --- a/samples/net/mbedtls_sslclient/src/tcp.c +++ b/samples/net/mbedtls_sslclient/src/tcp.c @@ -68,7 +68,6 @@ int tcp_tx(void *context, const unsigned char *buf, size_t size) rc = net_send(nbuf); fiber_sleep(TCP_RETRY_TIMEOUT); if (rc >= 0) { - ip_buf_unref(nbuf); return size; } switch (rc) { diff --git a/samples/net/nats_clients/publisher/src/netz.c b/samples/net/nats_clients/publisher/src/netz.c index aa9df1eb6..ea15dcd90 100644 --- a/samples/net/nats_clients/publisher/src/netz.c +++ b/samples/net/nats_clients/publisher/src/netz.c @@ -152,7 +152,6 @@ static int tcp_tx(struct net_context *ctx, uint8_t *buf, size_t size, rc = net_send(nbuf); if (rc >= 0) { - ip_buf_unref(nbuf); return 0; } switch (rc) { @@ -169,7 +168,7 @@ static int tcp_tx(struct net_context *ctx, uint8_t *buf, size_t size, } } while (1); - return 0; + return -EIO; } static int tcp_rx(struct net_context *ctx, uint8_t *buf, size_t *read_bytes, diff --git a/samples/net/paho_mqtt_clients/publisher/src/netz.c b/samples/net/paho_mqtt_clients/publisher/src/netz.c index 8d59276a1..6b916b338 100644 --- a/samples/net/paho_mqtt_clients/publisher/src/netz.c +++ b/samples/net/paho_mqtt_clients/publisher/src/netz.c @@ -152,7 +152,6 @@ static int tcp_tx(struct net_context *ctx, uint8_t *buf, size_t size, rc = net_send(nbuf); if (rc >= 0) { - ip_buf_unref(nbuf); return 0; } switch (rc) { @@ -169,7 +168,7 @@ static int tcp_tx(struct net_context *ctx, uint8_t *buf, size_t size, } } while (1); - return 0; + return -EIO; } static int tcp_rx(struct net_context *ctx, uint8_t *buf, size_t *read_bytes, |