mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	Fix one more "(null)" string.
If a hint with no presence portion were added, it would result in another "(null)" string warning. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8-digiumphones@360071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -4361,6 +4361,8 @@ static char *parse_hint_presence(struct ast_str *hint_args) | ||||
| 	if ((tmp = strrchr(copy, ','))) { | ||||
| 		*tmp = '\0'; | ||||
| 		tmp++; | ||||
| 	} else { | ||||
| 		return NULL; | ||||
| 	} | ||||
| 	ast_str_set(&hint_args, 0, "%s", tmp); | ||||
| 	return ast_str_buffer(hint_args); | ||||
| @@ -4465,6 +4467,11 @@ static int extension_presence_state_helper(struct ast_exten *e, char **subtype, | ||||
| 	ast_str_set(&hint_app, 0, "%s", app); | ||||
| 	presence_provider = parse_hint_presence(hint_app); | ||||
|  | ||||
| 	if (ast_strlen_zero(presence_provider)) { | ||||
| 		/* No presence string in the hint */ | ||||
| 		return 0; | ||||
| 	} | ||||
|  | ||||
| 	return ast_presence_state(presence_provider, subtype, message); | ||||
| } | ||||
| int ast_hint_presence_state(struct ast_channel *c, const char *context, const char *exten, char **subtype, char **message) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user