Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow compiling with TCP=0, PING=0 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stack/pico_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,9 +1635,11 @@ int pico_socket_fionread(struct pico_socket *s)
return f->payload_len;
}
#endif
#ifdef PICO_SUPPORT_TCP
else if (PROTO(s) == PICO_PROTO_TCP) {
return pico_tcp_queue_in_size(s);
}
#endif
return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions stack/pico_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,9 @@ int MOCKABLE pico_stack_init(struct pico_stack **S)
#ifdef PICO_SUPPORT_ICMP4
pico_protocol_init(*S, &pico_proto_icmp4);
ATTACH_QUEUES(*S, icmp4, pico_proto_icmp4);
#ifdef PICO_SUPPORT_PING
EMPTY_TREE((*S)->Pings, pico_icmp4_cookie_compare);
#endif
EMPTY_TREE((*S)->ICMP4Sockets, icmp4_socket_cmp);
#endif

Expand Down