config: port: convert 'announceReceiptTimeout' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit is contained in:
		
							parent
							
								
									639ce56fa0
								
							
						
					
					
						commit
						35227f2d1f
					
				
							
								
								
									
										9
									
								
								config.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								config.c
									
									
									
									
									
								
							@ -91,6 +91,7 @@ struct config_item {
 | 
				
			|||||||
	CONFIG_ITEM_INT(label, 1, _default, min, max)
 | 
						CONFIG_ITEM_INT(label, 1, _default, min, max)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct config_item config_tab[] = {
 | 
					struct config_item config_tab[] = {
 | 
				
			||||||
 | 
						PORT_ITEM_INT("announceReceiptTimeout", 3, 2, UINT8_MAX),
 | 
				
			||||||
	GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
 | 
						GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
 | 
				
			||||||
	GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
 | 
						GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
 | 
				
			||||||
	PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
 | 
						PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
 | 
				
			||||||
@ -267,13 +268,7 @@ static enum parser_result parse_pod_setting(const char *option,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	enum parser_result r;
 | 
						enum parser_result r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!strcmp(option, "announceReceiptTimeout")) {
 | 
						if (!strcmp(option, "syncReceiptTimeout")) {
 | 
				
			||||||
		r = get_ranged_uint(value, &uval, 2, UINT8_MAX);
 | 
					 | 
				
			||||||
		if (r != PARSED_OK)
 | 
					 | 
				
			||||||
			return r;
 | 
					 | 
				
			||||||
		pod->announceReceiptTimeout = uval;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	} else if (!strcmp(option, "syncReceiptTimeout")) {
 | 
					 | 
				
			||||||
		r = get_ranged_uint(value, &uval, 0, UINT8_MAX);
 | 
							r = get_ranged_uint(value, &uval, 0, UINT8_MAX);
 | 
				
			||||||
		if (r != PARSED_OK)
 | 
							if (r != PARSED_OK)
 | 
				
			||||||
			return r;
 | 
								return r;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								ds.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								ds.h
									
									
									
									
									
								
							@ -125,7 +125,6 @@ struct portDS {
 | 
				
			|||||||
#define FRI_ASAP (-128)
 | 
					#define FRI_ASAP (-128)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct port_defaults {
 | 
					struct port_defaults {
 | 
				
			||||||
	UInteger8 announceReceiptTimeout;
 | 
					 | 
				
			||||||
	UInteger8 syncReceiptTimeout;
 | 
						UInteger8 syncReceiptTimeout;
 | 
				
			||||||
	UInteger8 transportSpecific;
 | 
						UInteger8 transportSpecific;
 | 
				
			||||||
	int announce_span;
 | 
						int announce_span;
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								port.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								port.c
									
									
									
									
									
								
							@ -1447,7 +1447,7 @@ static int port_initialize(struct port *p)
 | 
				
			|||||||
	p->logMinDelayReqInterval  = config_get_int(cfg, p->name, "logMinDelayReqInterval");
 | 
						p->logMinDelayReqInterval  = config_get_int(cfg, p->name, "logMinDelayReqInterval");
 | 
				
			||||||
	p->peerMeanPathDelay       = 0;
 | 
						p->peerMeanPathDelay       = 0;
 | 
				
			||||||
	p->logAnnounceInterval     = config_get_int(cfg, p->name, "logAnnounceInterval");
 | 
						p->logAnnounceInterval     = config_get_int(cfg, p->name, "logAnnounceInterval");
 | 
				
			||||||
	p->announceReceiptTimeout  = p->pod.announceReceiptTimeout;
 | 
						p->announceReceiptTimeout  = config_get_int(cfg, p->name, "announceReceiptTimeout");
 | 
				
			||||||
	p->syncReceiptTimeout      = p->pod.syncReceiptTimeout;
 | 
						p->syncReceiptTimeout      = p->pod.syncReceiptTimeout;
 | 
				
			||||||
	p->transportSpecific       = p->pod.transportSpecific;
 | 
						p->transportSpecific       = p->pod.transportSpecific;
 | 
				
			||||||
	p->logSyncInterval         = config_get_int(cfg, p->name, "logSyncInterval");
 | 
						p->logSyncInterval         = config_get_int(cfg, p->name, "logSyncInterval");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user