summaryrefslogtreecommitdiffstats
path: root/configd
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2023-03-06 11:42:42 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2023-03-06 15:11:11 +0000
commit793a0bbc6c8bedcf0ee5de51be687d760defcd57 (patch)
tree016f83e652b0734aa3555df9332c72f9a82ff424 /configd
parent9a95875744e88f29cb4a78f8bb31bab13e7cec4d (diff)
use ref_counted in fnet
also get rid of some cleanup functions on reference counted classes enable specifying low-level parameters to addref/subref (cnt/reserve)
Diffstat (limited to 'configd')
-rw-r--r--configd/src/apps/cmd/main.cpp4
-rw-r--r--configd/src/apps/sentinel/outward-check.cpp4
-rw-r--r--configd/src/apps/sentinel/peer-check.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/configd/src/apps/cmd/main.cpp b/configd/src/apps/cmd/main.cpp
index 3ea26fee150..9ee7130a06e 100644
--- a/configd/src/apps/cmd/main.cpp
+++ b/configd/src/apps/cmd/main.cpp
@@ -74,7 +74,7 @@ void
Cmd::finiRPC()
{
if (_target != nullptr) {
- _target->SubRef();
+ _target->internal_subref();
_target = nullptr;
}
_server.reset();
@@ -150,7 +150,7 @@ Cmd::run(const Method &cmd, const char *arg)
}
}
}
- req->SubRef();
+ req->internal_subref();
finiRPC();
return retval;
}
diff --git a/configd/src/apps/sentinel/outward-check.cpp b/configd/src/apps/sentinel/outward-check.cpp
index b81c8e23750..b8bb2e69077 100644
--- a/configd/src/apps/sentinel/outward-check.cpp
+++ b/configd/src/apps/sentinel/outward-check.cpp
@@ -53,9 +53,9 @@ void OutwardCheck::RequestDone(FRT_RPCRequest *req) {
req->GetErrorMessage(), req->GetErrorCode());
_result = CcResult::CONN_FAIL;
}
- _req->SubRef();
+ _req->internal_subref();
_req = nullptr;
- _target->SubRef();
+ _target->internal_subref();
_target = nullptr;
_context.latch.countDown();
}
diff --git a/configd/src/apps/sentinel/peer-check.cpp b/configd/src/apps/sentinel/peer-check.cpp
index 0af5a6fb58f..ac3775d4c4d 100644
--- a/configd/src/apps/sentinel/peer-check.cpp
+++ b/configd/src/apps/sentinel/peer-check.cpp
@@ -39,9 +39,9 @@ void PeerCheck::RequestDone(FRT_RPCRequest *req) {
LOG(debug, "OK ping to %s [port %d]", _hostname.c_str(), _portnum);
_statusOk = true;
}
- _req->SubRef();
+ _req->internal_subref();
_req = nullptr;
- _target->SubRef();
+ _target->internal_subref();
_target = nullptr;
// Note: will delete this object, so must be called as final step:
_callback.returnStatus(_statusOk);