Convert to span and avoid deprecated ndn-cxx functions
Change-Id: I45c50527fe53498b53a3d951458bdff8e7d7778c
diff --git a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
index 0834bf5..9a0f5ac 100644
--- a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
+++ b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, 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,
@@ -98,10 +98,9 @@
}
if (interest.getName() == "/localhop/ndn-autoconf/hub") {
- const char FACEURI[] = "udp://router.example.net";
auto data = makeData(Name("/localhop/ndn-autoconf/hub").appendVersion());
data->setFreshnessPeriod(1_s);
- data->setContent(makeBinaryBlock(tlv::nfd::Uri, FACEURI, ::strlen(FACEURI)));
+ data->setContent(makeStringBlock(tlv::nfd::Uri, "udp://router.example.net"));
face.receive(*data);
return;
}