OperationBase::chan is nullptr until Channel is created, check before getting name
have name() return the channel name from OperationBase, not OperationBase::chan::name
This commit is contained in:
committed by
Michael Davidsaver
parent
38cc6deb74
commit
4af3028930
+11
-1
@@ -313,6 +313,15 @@ struct Tester {
|
||||
op.reset();
|
||||
}
|
||||
|
||||
void name()
|
||||
{
|
||||
testShow()<<__func__;
|
||||
|
||||
auto op = cli.get("nonexistent").exec();
|
||||
auto op_name = op->name();
|
||||
testEq(op_name, "nonexistent");
|
||||
}
|
||||
|
||||
void manualExec()
|
||||
{
|
||||
testShow()<<__func__;
|
||||
@@ -516,7 +525,7 @@ void testError(bool phase)
|
||||
|
||||
MAIN(testget)
|
||||
{
|
||||
testPlan(62);
|
||||
testPlan(63);
|
||||
testSetup();
|
||||
logger_config_env();
|
||||
const bool canIPv6 = pvxs::impl::evsocket::canIPv6;
|
||||
@@ -533,6 +542,7 @@ MAIN(testget)
|
||||
Tester().cancel();
|
||||
Tester().asyncCancel();
|
||||
Tester().orphan();
|
||||
Tester().name();
|
||||
Tester().manualExec();
|
||||
Tester().badRequest();
|
||||
Tester().delayExec();
|
||||
|
||||
Reference in New Issue
Block a user