Fix XID I field size TX, RX parameter encoding
Fix XID I field size TX, RX parameter encoding to indicate the I frame size in bits, rather than octets
This commit is contained in:
		
							parent
							
								
									671d4ef337
								
							
						
					
					
						commit
						eb04bc4bb5
					
				
					 2 changed files with 8 additions and 8 deletions
				
			
		
							
								
								
									
										12
									
								
								src/print.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/print.c
									
										
									
									
									
								
							|  | @ -167,12 +167,12 @@ int patty_print_params(FILE *fh, | ||||||
|         size_t value; |         size_t value; | ||||||
|         char *name; |         char *name; | ||||||
|     } fields[] = { |     } fields[] = { | ||||||
|         { PATTY_AX25_PARAM_INFO_TX,   params->info_tx,   "I Field Length TX" }, |         { PATTY_AX25_PARAM_INFO_TX,   params->info_tx >> 3, "I Field Length TX" }, | ||||||
|         { PATTY_AX25_PARAM_INFO_RX,   params->info_rx,   "I Field Length RX" }, |         { PATTY_AX25_PARAM_INFO_RX,   params->info_rx >> 3, "I Field Length RX" }, | ||||||
|         { PATTY_AX25_PARAM_WINDOW_TX, params->window_tx, "Window Size TX" }, |         { PATTY_AX25_PARAM_WINDOW_TX, params->window_tx,    "Window Size TX" }, | ||||||
|         { PATTY_AX25_PARAM_WINDOW_RX, params->window_rx, "Window Size RX" }, |         { PATTY_AX25_PARAM_WINDOW_RX, params->window_rx,    "Window Size RX" }, | ||||||
|         { PATTY_AX25_PARAM_ACK,       params->ack,       "Ack timer" }, |         { PATTY_AX25_PARAM_ACK,       params->ack,          "Ack timer" }, | ||||||
|         { PATTY_AX25_PARAM_RETRY,     params->retry,     "Retry" }, |         { PATTY_AX25_PARAM_RETRY,     params->retry,        "Retry" }, | ||||||
|         { 0, 0, NULL } |         { 0, 0, NULL } | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -252,7 +252,7 @@ int patty_ax25_sock_params_set(patty_ax25_sock *sock, | ||||||
| 
 | 
 | ||||||
|     if (params->flags & PATTY_AX25_PARAM_INFO_RX) { |     if (params->flags & PATTY_AX25_PARAM_INFO_RX) { | ||||||
|         if (sock->n_maxlen_tx > params->info_rx) { |         if (sock->n_maxlen_tx > params->info_rx) { | ||||||
|             sock->n_maxlen_tx = params->info_rx; |             sock->n_maxlen_tx = params->info_rx >> 3; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -560,7 +560,7 @@ ssize_t patty_ax25_sock_send_xid(patty_ax25_sock *sock, | ||||||
| 
 | 
 | ||||||
|     params.classes   = sock->flags_classes; |     params.classes   = sock->flags_classes; | ||||||
|     params.hdlc      = sock->flags_hdlc; |     params.hdlc      = sock->flags_hdlc; | ||||||
|     params.info_rx   = sock->n_maxlen_rx; |     params.info_rx   = sock->n_maxlen_rx << 3; | ||||||
|     params.window_rx = sock->n_window_rx; |     params.window_rx = sock->n_window_rx; | ||||||
|     params.ack       = sock->n_ack; |     params.ack       = sock->n_ack; | ||||||
|     params.retry     = sock->n_retry; |     params.retry     = sock->n_retry; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue