[lib-client] send_request(): update the packet ID
This commit is contained in:
parent
8e7aac1e6e
commit
c53b8d61e7
|
@ -98,11 +98,14 @@ void owl_send_request(const int sockfd,
|
||||||
owl_send_packet(sockfd, server, packet, packet_size) ;
|
owl_send_packet(sockfd, server, packet, packet_size) ;
|
||||||
|
|
||||||
// Transmit remaining packets (if any):
|
// Transmit remaining packets (if any):
|
||||||
for (i = 0 ; i < nb_pkt - 1 ; ++i)
|
for (i = 1 ; i < nb_pkt ; ++i)
|
||||||
{
|
{
|
||||||
|
uint16_t current_pkt = htons(i + 1) ;
|
||||||
owl_msleep(delay) ; // Wait during the wanted delay
|
owl_msleep(delay) ; // Wait during the wanted delay
|
||||||
if (! owl_run)
|
if (! owl_run)
|
||||||
break ;
|
break ;
|
||||||
|
memcpy(&((char*) packet)[packet_size - sizeof(uint16_t)],
|
||||||
|
¤t_pkt, sizeof(uint16_t)) ;
|
||||||
owl_send_packet(sockfd, server, packet, packet_size) ;
|
owl_send_packet(sockfd, server, packet, packet_size) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue