Skip to contentSkip to conversation

fix error handling in client

PATCH Applied Hannes Diethelm 2 participants 4 messages May 26 – May 27

lore
Share & tools
lore
#0 lore raw

cover fix error handling in client

Hello

While writing the doc, I found a mistake in the last patch. If desired, I can also resend the last patch with this fixes in one patch.

Regards
Hannes

Hannes Diethelm (1):
tidbits: net-udp: fix error handling in client

 tidbits/oob-net-udp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/1 tidbits: net-udp: fix error handling in client

Also fix mistake in comment

---
 tidbits/oob-net-udp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tidbits/oob-net-udp.c +3 -1
index 3cd7cb2..11b8459 100644
@@ -8,7 +8,7 @@
  * The server mode [-S] receives a packet from on a given
  * port and sends a response to the sender's ip/port.
  *
- * The client mode [-S] sends a packet to a port/ip
+ * The client mode [-C] sends a packet to a port/ip
  * and receives the response from a server. The round
  * trip time is measured.
  *
@@ -443,6 +443,8 @@ int main(int argc, char *argv[])
 		 */
 		ret = evl_net_solicit(s, (const struct sockaddr *)&addr,
 				EVL_NEIGH_PERMANENT);
+		if (ret)
+			error(1, -ret, "evl_net_solicit()");
 
 		client(s, text, mcount, &addr, iter, delay);
 	} else if (mode == SERVER) {
Signature · 1 line
2.47.3
#2 lore raw

Re: [PATCH 1/1] tidbits: net-udp: fix error handling in client

Quoted 21 lines · Hannes Diethelm

Also fix mistake in comment

---
 tidbits/oob-net-udp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tidbits/oob-net-udp.c +1 -1
index 3cd7cb2..11b8459 100644
@@ -8,7 +8,7 @@
  * The server mode [-S] receives a packet from on a given
  * port and sends a response to the sender's ip/port.
  *
- * The client mode [-S] sends a packet to a port/ip
+ * The client mode [-C] sends a packet to a port/ip
  * and receives the response from a server. The round
  * trip time is measured.
  *

tidbits/oob-net-udp.c int main(int argc, char *argv[]) · line 450

Quoted 8 lines
tidbits/oob-net-udp.c +2 -0
@@ -443,6 +443,8 @@ int main(int argc, char *argv[])
 		 */
 		ret = evl_net_solicit(s, (const struct sockaddr *)&addr,
 				EVL_NEIGH_PERMANENT);
+		if (ret)
+			error(1, -ret, "evl_net_solicit()");
 
 		client(s, text, mcount, &addr, iter, delay);
 	} else if (mode == SERVER) {

Merged, thanks.

Signature · 1 line
Philippe.
#3 lore raw
In reply to Hannes Diethelm
Quoted 4 lines · Hannes Diethelm

Hello

While writing the doc, I found a mistake in the last patch. If desired, I can also resend the last patch with this fixes in one patch.

No need for this, thanks. Merged upstream.

Signature · 1 line
Philippe.