updated picoTCP to 1.4.0, lowered build optimization levels to -O2, improved selftest

This commit is contained in:
Joseph Henry
2017-06-05 14:26:06 -07:00
parent 47a80e8954
commit 19839eeac9
367 changed files with 107850 additions and 3813 deletions

View File

@@ -197,11 +197,11 @@ static int socket_tcp_do_deliver(struct pico_socket *s, struct pico_frame *f)
int pico_socket_tcp_deliver(struct pico_sockport *sp, struct pico_frame *f)
{
struct pico_socket *found = NULL;
struct pico_socket *target = NULL;
struct pico_tree_node *index = NULL;
struct pico_tree_node *_tmp;
struct pico_socket *s = NULL;
pico_tree_foreach_safe(index, &sp->socks, _tmp){
s = index->keyValue;
/* 4-tuple identification of socket (port-IP) */
@@ -214,10 +214,15 @@ int pico_socket_tcp_deliver(struct pico_sockport *sp, struct pico_frame *f)
}
if (found)
break;
{
target = found;
if ( found->remote_port != 0)
/* only break if it's connected */
break;
}
} /* FOREACH */
return socket_tcp_do_deliver(found, f);
return socket_tcp_do_deliver(target, f);
}
struct pico_socket *pico_socket_tcp_open(uint16_t family)