Loading lib/tftp.c +15 −21 Original line number Diff line number Diff line Loading @@ -657,7 +657,6 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) { struct SessionHandle *data = state->conn->data; ssize_t sbytes; int rblock; int readcount; CURLcode res = CURLE_OK; Loading @@ -681,13 +680,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) res = CURLE_SEND_ERROR; } else { /* Re-send the data packet */ sbytes = sendto(state->sockfd, (void *)&state->spacket, /* Re-send the data packet and check all sbytes were sent */ if(sendto(state->sockfd, (void *)&state->spacket, 4+state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ if(sbytes<0) { state->remote_addrlen) < 0) { failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); res = CURLE_SEND_ERROR; } Loading @@ -710,12 +707,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) state->sbytes = readcount; if(res) return res; sbytes = sendto(state->sockfd, (void *)state->spacket.data, /* Send the data packet and check all sbytes were sent */ if(sendto(state->sockfd, (void *)state->spacket.data, 4+state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ if(sbytes<0) { state->remote_addrlen) < 0) { failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); return CURLE_SEND_ERROR; } Loading @@ -735,13 +731,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) state->state = TFTP_STATE_FIN; } else { /* Re-send the data packet */ sbytes = sendto(state->sockfd, (void *)state->spacket.data, /* Re-send the data packet and check all sbytes were sent */ if(sendto(state->sockfd, (void *)state->spacket.data, 4+state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ if(sbytes<0) { state->remote_addrlen) < 0) { failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); return CURLE_SEND_ERROR; } Loading Loading
lib/tftp.c +15 −21 Original line number Diff line number Diff line Loading @@ -657,7 +657,6 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) { struct SessionHandle *data = state->conn->data; ssize_t sbytes; int rblock; int readcount; CURLcode res = CURLE_OK; Loading @@ -681,13 +680,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) res = CURLE_SEND_ERROR; } else { /* Re-send the data packet */ sbytes = sendto(state->sockfd, (void *)&state->spacket, /* Re-send the data packet and check all sbytes were sent */ if(sendto(state->sockfd, (void *)&state->spacket, 4+state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ if(sbytes<0) { state->remote_addrlen) < 0) { failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); res = CURLE_SEND_ERROR; } Loading @@ -710,12 +707,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) state->sbytes = readcount; if(res) return res; sbytes = sendto(state->sockfd, (void *)state->spacket.data, /* Send the data packet and check all sbytes were sent */ if(sendto(state->sockfd, (void *)state->spacket.data, 4+state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ if(sbytes<0) { state->remote_addrlen) < 0) { failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); return CURLE_SEND_ERROR; } Loading @@ -735,13 +731,11 @@ static CURLcode tftp_tx(tftp_state_data_t *state, tftp_event_t event) state->state = TFTP_STATE_FIN; } else { /* Re-send the data packet */ sbytes = sendto(state->sockfd, (void *)state->spacket.data, /* Re-send the data packet and check all sbytes were sent */ if(sendto(state->sockfd, (void *)state->spacket.data, 4+state->sbytes, SEND_4TH_ARG, (struct sockaddr *)&state->remote_addr, state->remote_addrlen); /* Check all sbytes were sent */ if(sbytes<0) { state->remote_addrlen) < 0) { failf(data, "%s", Curl_strerror(state->conn, SOCKERRNO)); return CURLE_SEND_ERROR; } Loading