daemon+tests: avoid deprecated ndn-cxx functions
Change-Id: Idfa341629919d63fac140eda0b465f8f8abd38e6
diff --git a/tests/daemon/mgmt/manager-common-fixture.cpp b/tests/daemon/mgmt/manager-common-fixture.cpp
index db207e9..83136be 100644
--- a/tests/daemon/mgmt/manager-common-fixture.cpp
+++ b/tests/daemon/mgmt/manager-common-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -47,7 +47,7 @@
const ControlParameters& params,
const Name& identity)
{
- commandName.append(params.wireEncode());
+ commandName.append(tlv::GenericNameComponent, params.wireEncode());
return this->makeCommandInterest(commandName, identity);
}
@@ -155,12 +155,11 @@
}
ndn::EncodingBuffer encoder;
- size_t valueLength = 0;
+ size_t length = 0;
for (size_t i = startIndex; i < endIndex ; i ++) {
- valueLength += encoder.appendByteArray(m_responses[i].getContent().value(),
- m_responses[i].getContent().value_size());
+ length += encoder.appendBytes(m_responses[i].getContent().value_bytes());
}
- encoder.prependVarNumber(valueLength);
+ encoder.prependVarNumber(length);
encoder.prependVarNumber(tlv::Content);
return encoder.block();
}