Revert "samples: sockets: Don't open the socket if the test protocol is enabled"
This reverts commit da0f3311ff
. It was
clearly intended to be a debugging aid when developing TCP2, not
intended for mainline. This fixes building this sample on POSIX
systems with Makefile.posix.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
31ee76d248
commit
feac5c1c45
|
@ -29,10 +29,6 @@ void main(void)
|
|||
struct sockaddr_in bind_addr;
|
||||
static int counter;
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_TEST_PROTOCOL)) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
serv = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
|
||||
if (serv < 0) {
|
||||
|
@ -84,10 +80,6 @@ void main(void)
|
|||
break;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_TCP2)) {
|
||||
printf("recv: %d byte(s)\n", len);
|
||||
}
|
||||
|
||||
p = buf;
|
||||
do {
|
||||
out_len = send(client, p, len, 0);
|
||||
|
|
Loading…
Reference in New Issue