Switch to struct timeval for sock timers
This commit is contained in:
		
							parent
							
								
									a0660345bb
								
							
						
					
					
						commit
						810361647a
					
				
					 3 changed files with 18 additions and 16 deletions
				
			
		|  | @ -3,6 +3,7 @@ | |||
| 
 | ||||
| #include <stdint.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/time.h> | ||||
| 
 | ||||
| #include <patty/kiss.h> | ||||
| #include <patty/list.h> | ||||
|  |  | |||
|  | @ -55,7 +55,7 @@ typedef struct _patty_ax25_sock { | |||
|     enum patty_ax25_sock_status status; | ||||
|     enum patty_ax25_sock_mode   mode; | ||||
| 
 | ||||
|     time_t timer_ack, | ||||
|     struct timeval timer_ack, | ||||
|                    timer_response, | ||||
|                    timer_keepalive; | ||||
| 
 | ||||
|  |  | |||
|  | @ -146,11 +146,12 @@ void patty_ax25_sock_reset(patty_ax25_sock *sock) { | |||
|     sock->n_window_rx = PATTY_AX25_SOCK_DEFAULT_WINDOW; | ||||
|     sock->n_ack       = PATTY_AX25_SOCK_DEFAULT_ACK; | ||||
|     sock->n_retry     = PATTY_AX25_SOCK_DEFAULT_RETRY; | ||||
|     sock->timer_ack       = 0; | ||||
|     sock->timer_response  = 0; | ||||
|     sock->timer_keepalive = 0; | ||||
|     sock->seq_send    = 0; | ||||
|     sock->seq_recv    = 0; | ||||
| 
 | ||||
|     timerclear(&sock->timer_ack); | ||||
|     timerclear(&sock->timer_response); | ||||
|     timerclear(&sock->timer_keepalive); | ||||
| } | ||||
| 
 | ||||
| void patty_ax25_sock_destroy(patty_ax25_sock *sock) { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue