aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin')
-rw-r--r--hicn-plugin/libvapi-safe/src/vapi_safe.cc11
-rw-r--r--hicn-plugin/src/pcs.h2
-rw-r--r--hicn-plugin/src/test/vpp.c3
3 files changed, 11 insertions, 5 deletions
diff --git a/hicn-plugin/libvapi-safe/src/vapi_safe.cc b/hicn-plugin/libvapi-safe/src/vapi_safe.cc
index 8747ca738..dc2db329e 100644
--- a/hicn-plugin/libvapi-safe/src/vapi_safe.cc
+++ b/hicn-plugin/libvapi-safe/src/vapi_safe.cc
@@ -312,16 +312,21 @@ public:
~VapiGlobalConnection ()
{
- std::cout << "\"adios1" << std::endl;
if (!isConnected ())
{
return;
}
- std::cout << "\"adios" << std::endl;
std::unique_lock<std::mutex> lock (vapi_mtx_);
vapi_disconnect (vapi_ctx_);
vapi_ctx_free (vapi_ctx_);
- timer_.cancel ();
+ try
+ {
+ timer_.cancel ();
+ }
+ catch (asio::system_error e)
+ {
+ // quit anyway
+ }
}
private:
diff --git a/hicn-plugin/src/pcs.h b/hicn-plugin/src/pcs.h
index 86fb72cc9..2019ddb73 100644
--- a/hicn-plugin/src/pcs.h
+++ b/hicn-plugin/src/pcs.h
@@ -647,7 +647,7 @@ hicn_pcs_lookup_one (hicn_pit_cs_t *pitcs, const hicn_name_t *name,
*pcs_entry = hicn_pcs_entry_get_entry_from_index (pitcs, (u32) (kv.value));
// If the search is successful, we MUST find the entry in the pool.
- ALWAYS_ASSERT (*pcs_entry);
+ ALWAYS_ASSERT (pcs_entry);
// If entry found and it is a CS entry, let's update the LRU
if (hicn_pcs_entry_is_cs (*pcs_entry))
diff --git a/hicn-plugin/src/test/vpp.c b/hicn-plugin/src/test/vpp.c
index 761e55759..e1f38e23d 100644
--- a/hicn-plugin/src/test/vpp.c
+++ b/hicn-plugin/src/test/vpp.c
@@ -199,6 +199,7 @@ vpp_init_internal (int argc, char *argv[])
if (arg == NULL)
{
free (argv_);
+ fclose (fp);
return 1;
}
argv_[argc_ - 1] = arg;
@@ -244,7 +245,7 @@ vpp_init_internal (int argc, char *argv[])
{
sizep = (u8 *) argv[i + 1];
size = 0;
- while (*sizep >= '0' && *sizep <= '9')
+ while (sizep && *sizep >= '0' && *sizep <= '9')
{
size *= 10;
size += *sizep++ - '0';