diff --git a/components/net/at/at_socket/at_socket.c b/components/net/at/at_socket/at_socket.c index fec1997579..69112204fa 100644 --- a/components/net/at/at_socket/at_socket.c +++ b/components/net/at/at_socket/at_socket.c @@ -655,6 +655,10 @@ int at_recvfrom(int socket, void *mem, size_t len, int flags, struct sockaddr *f { timeout = RT_WAITING_FOREVER; } + else + { + timeout = rt_tick_from_millisecond(timeout); + } while (1) { @@ -1161,7 +1165,7 @@ void at_freeaddrinfo(struct addrinfo *ai) } } -void at_scoket_device_register(const struct at_device_ops *ops) +void at_socket_device_register(const struct at_device_ops *ops) { RT_ASSERT(ops); RT_ASSERT(ops->at_connect); diff --git a/components/net/at/at_socket/at_socket.h b/components/net/at/at_socket/at_socket.h index 73368d28ca..526f8d618a 100644 --- a/components/net/at/at_socket/at_socket.h +++ b/components/net/at/at_socket/at_socket.h @@ -129,7 +129,7 @@ int at_getaddrinfo(const char *nodename, const char *servname, const struct addr void at_freeaddrinfo(struct addrinfo *ai); struct at_socket *at_get_socket(int socket); -void at_scoket_device_register(const struct at_device_ops *ops); +void at_socket_device_register(const struct at_device_ops *ops); #ifndef RT_USING_SAL