From 04fe3bccc0d89fb25cba4275337384602930b6d7 Mon Sep 17 00:00:00 2001 From: Scott Griepentrog Date: Fri, 14 Feb 2014 21:44:57 +0000 Subject: [PATCH] ARI: correct upper/lower case URI discrepancies URI's are supposed to be case sensitive and all lower case. In practice some portions of URI's in ARI are case insensitive and others are not, such as TECH, which in one instance would match a lower case name and in another would not. In this patch, the ast_endpoint_lastest_snapshot() function is modified to change the TECH portion to full upper case before lookup. This resolves the discrepancy noted by the reporter. However I chose to avoid forcing the /ari prefix of the URI's to be lower case for now. Except for the two cases here, all URI's should be lower case, unless they are part of a resource name or id. Review: https://reviewboard.asterisk.org/r/3211/ Reported by: Zane Conkle (closes issue ASTERISK-23125) ........ Merged revisions 408140 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408141 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/stasis_endpoints.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c index 81c4f15a37..3f8d324197 100644 --- a/main/stasis_endpoints.c +++ b/main/stasis_endpoints.c @@ -197,6 +197,7 @@ struct ast_endpoint_snapshot *ast_endpoint_latest_snapshot(const char *tech, if (!id) { return NULL; } + ast_tech_to_upper(id); msg = stasis_cache_get(ast_endpoint_cache(), ast_endpoint_snapshot_type(), id); -- 2.47.2