summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/rpc_cmd.hpp
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2017-11-20 10:23:47 +0100
committerNeale Ranns <nranns@cisco.com>2017-11-22 11:20:45 +0000
commit5a4f96a178b693ace8e736c30c949ced5928d824 (patch)
tree55109d1354c6fc3814282a9b9ba6e52fc19a43df /src/vpp-api/vom/rpc_cmd.hpp
parent4878cbe276ec1131d0cf30ac5df18aa9ba699bc4 (diff)
VOM: stats: Associate stat obj to interface
Change-Id: Id8b159dd72b92798538a32fe570fb0038d742ef2 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/rpc_cmd.hpp')
-rw-r--r--src/vpp-api/vom/rpc_cmd.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vpp-api/vom/rpc_cmd.hpp b/src/vpp-api/vom/rpc_cmd.hpp
index 60dbd47c8b3..ae3c6753d24 100644
--- a/src/vpp-api/vom/rpc_cmd.hpp
+++ b/src/vpp-api/vom/rpc_cmd.hpp
@@ -71,7 +71,16 @@ public:
/**
* Fulfill the commands promise. Called from the RX thread
*/
- void fulfill(const DATA& d) { m_promise.set_value(d); }
+ void fulfill(const DATA& d)
+ {
+ m_promise.set_value(d);
+
+ /*
+ * we reset the promise after setting the value to reuse it
+ * when we run the retire command from the same cmd object
+ */
+ m_promise = std::promise<DATA>();
+ }
/**
* Wait on the commands promise. i.e. block on the completion