aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/api.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-11-15 08:58:23 +0000
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-11-20 07:58:12 +0000
commit4eb89ea4dcad4c01664b5331745f4e9a38facbd2 (patch)
treef4c6935249f6461a03886ab89532e5563db1f75f /ctrl/libhicnctrl/src/api.c
parent40fde5ad542c30e59ac02639e29389085de89de5 (diff)
[HICN-394] Add route commands add, list, del for the hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Change-Id: I41641f6d27babaa1c413ecf2fe6eae0e499df97d
Diffstat (limited to 'ctrl/libhicnctrl/src/api.c')
-rw-r--r--ctrl/libhicnctrl/src/api.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ctrl/libhicnctrl/src/api.c b/ctrl/libhicnctrl/src/api.c
index 14ee69b53..5afecf7e6 100644
--- a/ctrl/libhicnctrl/src/api.c
+++ b/ctrl/libhicnctrl/src/api.c
@@ -91,7 +91,6 @@ struct hc_sock_s {
hc_sock_request_t *
hc_sock_request_create(int seq, hc_data_t * data, HC_PARSE parse)
{
- assert(seq >= 0);
assert(data);
hc_sock_request_t * request = malloc(sizeof(hc_sock_request_t));
@@ -851,11 +850,7 @@ hc_execute_command(hc_sock_t * s, hc_msg_t * msg, size_t msg_len,
}
int seq = hc_sock_get_next_seq(s);
- if (seq < 0) {
- ERROR("[hc_execute_command] Could not get next sequence number");
- goto ERR_SEQ;
- }
-
+
/* Create state used to process the request */
hc_sock_request_t * request = NULL;
request = hc_sock_request_create(seq, data, params->parse);
@@ -902,7 +897,6 @@ ERR_PROCESS:
ERR_MAP:
hc_sock_request_free(request);
ERR_REQUEST:
-ERR_SEQ:
hc_data_free(data);
ERR_DATA:
return -1;