diff options
| author | chenyong <[email protected]> | 2019-05-05 14:50:29 +0800 |
|---|---|---|
| committer | chenyong <[email protected]> | 2019-05-05 14:50:29 +0800 |
| commit | 9752dd78897c425833cd8b391d1d4d721a8efb4f (patch) | |
| tree | 9db701368be01d2e0b3fa2d1af5378a91c16d3e9 /components | |
| parent | c2244a5c57d5fd0dbc4697ed43f1a14bbe791398 (diff) | |
[net][sal] Delete the judgment of the default network interface device when socket is created
Signed-off-by: chenyong <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/net/sal_socket/src/sal_socket.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 008a29e252..f6fdeb61f7 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -387,14 +387,7 @@ static int socket_init(int family, int type, int protocol, struct sal_socket **r sock->type = type; sock->protocol = protocol; - /* get socket operations from network interface device */ - if (netdv_def == RT_NULL) - { - LOG_E("not find default network interface device for socket create."); - return -3; - } - - if (netdev_is_up(netdv_def) && netdev_is_link_up(netdv_def)) + if (netdv_def && netdev_is_up(netdv_def) && netdev_is_link_up(netdv_def)) { /* check default network interface device protocol family */ pf = (struct sal_proto_family *) netdv_def->sal_user_data; |
