Skip to content

Commit

Permalink
[SQUASH ME] adapt shell commands a little
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Mar 13, 2015
1 parent 53c7e76 commit 7f1b556
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions sys/shell/commands/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ endif
ifneq (,$(filter lpc2387,$(USEMODULE)))
SRC += sc_heap.c
endif
ifneq (,$(filter ng_icmpv6,$(USEMODULE)))
SRC += sc_ng_icmpv6.c
endif
ifneq (,$(filter random,$(USEMODULE)))
SRC += sc_mersenne.c
endif
Expand All @@ -65,6 +62,9 @@ ifneq (,$(filter ng_netif,$(USEMODULE)))
endif
endif
endif
ifneq (,$(filter ng_icmpv6,$(USEMODULE)))
SRC += sc_icmpv6.c
endif

# TODO
# Conditional building not possible at the moment due to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void _handle_reply(ng_pktsnip_t *pkt, uint64_t time)
LL_SEARCH_SCALAR(pkt, icmpv6, type, NG_NETTYPE_ICMPV6);

if ((ipv6 == NULL) || (icmpv6 == NULL)) {
puts("IPv6 header or ICMPv6 header not found in reply");
puts("error: IPv6 header or ICMPv6 header not found in reply");
return;
}

Expand Down Expand Up @@ -124,14 +124,14 @@ void _icmpv6_ping(int argc, char **argv)
}

if (ng_netreg_register(NG_NETTYPE_ICMPV6, &my_entry) < 0) {
puts("registry is full");
puts("error: registry is full");
return;
}

ipv6_entry = ng_netreg_lookup(NG_NETTYPE_IPV6, NG_NETREG_DEMUX_CTX_ALL);

if (ipv6_entry == NULL) {
puts("ipv6 thread missing");
puts("error: ipv6 thread missing");
return;
}

Expand All @@ -143,7 +143,7 @@ void _icmpv6_ping(int argc, char **argv)
pkt = ng_icmpv6_echo_req_build(id, seq, NULL, payload_len);

if (pkt == NULL) {
puts("packet buffer full");
puts("error: packet buffer full");
}

_set_payload(pkt->data, payload_len);
Expand All @@ -152,7 +152,7 @@ void _icmpv6_ping(int argc, char **argv)
sizeof(ng_ipv6_addr_t));

if (ipv6 == NULL) {
puts("packet buffer full");
puts("error: packet buffer full");
return;
}

Expand Down

0 comments on commit 7f1b556

Please sign in to comment.