mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-25 06:00:36 +00:00 
			
		
		
		
	iax2-provision: Fix improper return on failed cache retrieval
(closes issue ASTERISK-20337)
reported by: John Covert
Patches:
    iax2-provision.c.patch uploaded by John Covert (license 5512)
........
Merged revisions 373342 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 373343 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 373368 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
			
			
This commit is contained in:
		| @@ -262,10 +262,8 @@ int iax_provision_version(unsigned int *version, const char *template, int force | ||||
| 	memset(&ied, 0, sizeof(ied)); | ||||
|  | ||||
| 	ast_mutex_lock(&provlock); | ||||
| 	if (!(ast_db_get("iax/provisioning/cache", template, tmp, sizeof(tmp)))) { | ||||
| 		ast_log(LOG_ERROR, "ast_db_get failed to retrieve iax/provisioning/cache\n"); | ||||
| 		ast_mutex_unlock(&provlock); | ||||
| 		return -1; | ||||
| 	if (ast_db_get("iax/provisioning/cache", template, tmp, sizeof(tmp))) { | ||||
| 		ast_log(LOG_ERROR, "ast_db_get failed to retrieve iax/provisioning/cache/%s\n", template); | ||||
| 	} | ||||
| 	if (sscanf(tmp, "v%30x", version) != 1) { | ||||
| 		if (strcmp(tmp, "u")) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user