gluon-mesh-vpn-fastd: make respondd module compile again
by moving the declaration of ret to the top of get_fastd()
This commit is contained in:
		
							parent
							
								
									4899dda4af
								
							
						
					
					
						commit
						cbc429f40b
					
				| @ -75,6 +75,7 @@ static struct json_object * get_fastd_version(void) { | |||||||
| 
 | 
 | ||||||
| static struct json_object * get_fastd(void) { | static struct json_object * get_fastd(void) { | ||||||
| 	bool enabled = false; | 	bool enabled = false; | ||||||
|  | 	struct json_object *ret = json_object_new_object(); | ||||||
| 
 | 
 | ||||||
| 	struct uci_context *ctx = uci_alloc_context(); | 	struct uci_context *ctx = uci_alloc_context(); | ||||||
| 	if (!ctx) | 	if (!ctx) | ||||||
| @ -93,11 +94,10 @@ static struct json_object * get_fastd(void) { | |||||||
| 	if (!enabled_str || !strcmp(enabled_str, "1")) | 	if (!enabled_str || !strcmp(enabled_str, "1")) | ||||||
| 		enabled = true; | 		enabled = true; | ||||||
| 
 | 
 | ||||||
|  disabled: | disabled: | ||||||
| 	uci_free_context(ctx); | 	uci_free_context(ctx); | ||||||
|  disabled_nofree: |  | ||||||
| 
 | 
 | ||||||
| 	struct json_object *ret = json_object_new_object(); | disabled_nofree: | ||||||
| 	json_object_object_add(ret, "version", get_fastd_version()); | 	json_object_object_add(ret, "version", get_fastd_version()); | ||||||
| 	json_object_object_add(ret, "enabled", json_object_new_boolean(enabled)); | 	json_object_object_add(ret, "enabled", json_object_new_boolean(enabled)); | ||||||
| 	return ret; | 	return ret; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user