Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: RIOT-OS/RIOT
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 87ac0889e56e748a4258eb740589b96b4dd74673
Choose a base ref
..
head repository: RIOT-OS/RIOT
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 38492576bc5915adec990f08a6f70cbcfa97a418
Choose a head ref
Showing with 7 additions and 2 deletions.
  1. +7 −2 sys/stdio_udp/stdio_udp.c
9 changes: 7 additions & 2 deletions sys/stdio_udp/stdio_udp.c
Original file line number Diff line number Diff line change
@@ -30,6 +30,10 @@
#define CONFIG_STDIO_UDP_PORT 2323
#endif

#ifndef EOT
#define EOT 0x4
#endif

static sock_udp_t sock;
static sock_udp_ep_t remote;

@@ -48,8 +52,9 @@ static void _sock_cb(sock_udp_t *sock, sock_async_flags_t flags, void *arg)
isrpipe_write(&stdin_isrpipe, data, res);

/* detach remote */
if (res == 1 && *(int8_t *)data == EOF) {
puts("detach remote");
if (res == 1 && *(int8_t *)data == EOT) {
const char msg[] = "\nremote detached\n";
sock_udp_send(sock, msg, sizeof(msg), &remote);
memset(&remote, 0, sizeof(remote));
}
}