ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404

Implementation listing endpoints by technology returned an empty array if no
matching endpoints were found.  Fixed so a "404 Not Found" will be returned
instead.

(closes issue ASTERISK-22803)
Reported by: David M. Lee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin Harwell
2013-11-12 22:15:41 +00:00
parent 68d09e0bf1
commit 59dc668622
3 changed files with 20 additions and 3 deletions

View File

@@ -134,6 +134,7 @@ static void ast_ari_endpoints_list_by_tech_cb(
break;
case 500: /* Internal Server Error */
case 501: /* Not Implemented */
case 404: /* Endpoints not found */
is_valid = 1;
break;
default:
@@ -193,6 +194,7 @@ static void ast_ari_endpoints_get_cb(
break;
case 500: /* Internal Server Error */
case 501: /* Not Implemented */
case 404: /* Endpoints not found */
is_valid = 1;
break;
default: