kopia lustrzana https://github.com/espressif/esp-idf
WIFI: Iperf example's parameter opt was uninitialized, may leads setsockoption invalide if it equal to 0
rodzic
8f3393afdf
commit
b55bb0a61f
|
@ -124,7 +124,7 @@ static esp_err_t IRAM_ATTR iperf_run_tcp_server(void)
|
|||
int listen_socket;
|
||||
struct timeval t;
|
||||
int sockfd;
|
||||
int opt;
|
||||
int opt = 1;
|
||||
|
||||
listen_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (listen_socket < 0) {
|
||||
|
@ -195,7 +195,7 @@ static esp_err_t IRAM_ATTR iperf_run_udp_server(void)
|
|||
int want_recv = 0;
|
||||
uint8_t *buffer;
|
||||
int sockfd;
|
||||
int opt;
|
||||
int opt = 1;
|
||||
bool udp_recv_start = true ;
|
||||
|
||||
sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
|
@ -253,7 +253,7 @@ static esp_err_t iperf_run_udp_client(void)
|
|||
int want_send = 0;
|
||||
uint8_t *buffer;
|
||||
int sockfd;
|
||||
int opt;
|
||||
int opt = 1;
|
||||
int err;
|
||||
int id;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue