mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	time: add support for time64 libcs
Treat time_t's as entirely unique and use the POSIX API's for converting to/from strings. Lastly, a 64-bit integer formats as 20 digits at most in base10. Don't need to have any 100 byte buffers to hold that. ASTERISK-29674 #close Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> Change-Id: Id7b25bdca8f92e34229f6454f6c3e500f2cd6f56
This commit is contained in:
		
				
					committed by
					
						 Kevin Harwell
						Kevin Harwell
					
				
			
			
				
	
			
			
			
						parent
						
							96a3ff9edd
						
					
				
				
					commit
					f50e793665
				
			| @@ -489,7 +489,10 @@ static int expiration_str2struct(const struct aco_option *opt, struct ast_variab | ||||
| static int expiration_struct2str(const void *obj, const intptr_t *args, char **buf) | ||||
| { | ||||
| 	const struct ast_sip_contact *contact = obj; | ||||
| 	return (ast_asprintf(buf, "%ld", contact->expiration_time.tv_sec) < 0) ? -1 : 0; | ||||
| 	char secs[AST_TIME_T_LEN]; | ||||
|  | ||||
| 	ast_time_t_to_string(contact->expiration_time.tv_sec, secs, sizeof(secs)); | ||||
| 	return (ast_asprintf(buf, "%s", secs) < 0) ? -1 : 0; | ||||
| } | ||||
|  | ||||
| static int permanent_uri_sort_fn(const void *obj_left, const void *obj_right, int flags) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user