From 8abd93db328f18de6b14af68436af6f4e2e3c235 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 28 Jun 2019 11:56:20 +1000 Subject: [PATCH] libpcp, qa: fix regression in 766, 776 re webapi discovery Resolve failures in discovery tests due to incorrect string interpolation in libpcp. --- qa/766 | 4 ++-- qa/776 | 4 ++-- src/libpcp/src/auxserver.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/766 b/qa/766 index cfa4d065b7..af79030ef4 100755 --- a/qa/766 +++ b/qa/766 @@ -26,9 +26,9 @@ _sought_filter() # output for the --all invocations sed \ -e 's/No \(pmproxy servers\) discovered/Sought \1/g' \ - -e 's/No \(pmwebd servers\) discovered/Sought \1/g' \ + -e 's/No \(pmwebapi servers\) discovered/Sought \1/g' \ -e 's/Discovered \(pmproxy servers\):/Sought \1/g' \ - -e 's/Discovered \(pmwebd servers\):/Sought \1/g' \ + -e 's/Discovered \(pmwebapi servers\):/Sought \1/g' \ # end } diff --git a/qa/776 b/qa/776 index 47efba25b1..7277b4d256 100755 --- a/qa/776 +++ b/qa/776 @@ -29,9 +29,9 @@ _sought_filter() # output for the --all invocations sed \ -e 's/No \(pmproxy servers\) discovered/Sought \1/g' \ - -e 's/No \(pmwebd servers\) discovered/Sought \1/g' \ + -e 's/No \(pmwebapi servers\) discovered/Sought \1/g' \ -e 's/Discovered \(pmproxy servers\):/Sought \1/g' \ - -e 's/Discovered \(pmwebd servers\):/Sought \1/g' \ + -e 's/Discovered \(pmwebapi servers\):/Sought \1/g' \ # end } diff --git a/src/libpcp/src/auxserver.c b/src/libpcp/src/auxserver.c index 608ecebeae..68dd91cccd 100644 --- a/src/libpcp/src/auxserver.c +++ b/src/libpcp/src/auxserver.c @@ -186,7 +186,7 @@ __pmWebAPIAddPorts(int **ports, int nports) * error. */ if (new_nports <= nports) - new_nports = __pmAddPorts(TO_STRING(PMWEBAPI_PORT), ports, nports); + new_nports = __pmAddPorts(TO_STRING(WEBAPI_PORT), ports, nports); return new_nports; }