fixed retransmission
FossilOrigin-Name: be770d23bb7a4df7a4d72f4facf76d03f91a9079cdd7a968394c2035eafc6a89
This commit is contained in:
parent
ef0474f0dd
commit
9f41845f67
@ -159,9 +159,6 @@ cw_send_msg( struct conn * conn, uint8_t *msg)
|
|||||||
|
|
||||||
return conn->write(conn,buf,msglen + hlen);
|
return conn->write(conn,buf,msglen + hlen);
|
||||||
|
|
||||||
|
|
||||||
printf("packetlen = %d (%d)\n",packetlen,hlen);
|
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -180,12 +177,13 @@ int cw_send_request(struct conn *conn,int msg_id)
|
|||||||
errno=ENOMSG;
|
errno=ENOMSG;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
conn_send_msg(conn, conn->req_buffer);
|
/* conn_send_msg(conn, conn->req_buffer);*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rc=-1;
|
rc=-1;
|
||||||
for (i=0; i<conn->max_retransmit && rc<0; i++){
|
for (i=0; i<conn->max_retransmit && rc<0; i++){
|
||||||
|
conn_send_msg(conn, conn->req_buffer);
|
||||||
if ( i>0 ){
|
if ( i>0 ){
|
||||||
cw_log(LOG_WARNING,"Retransmitting request ... %d",i);
|
cw_log(LOG_WARNING,"Retransmitting request ... %d",i);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user