diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-03-31 20:35:11 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-01 14:25:39 +0200 |
commit | ff3e622ce3f686c38848dcc3aedcbf380c631910 (patch) | |
tree | 5c4f8876f8865e67c3546dc0683e220ee59be6be /src/ipcpd | |
parent | fd483c6bbb3c8783391d15c3a73bc4775059d78f (diff) | |
download | ouroboros-ff3e622ce3f686c38848dcc3aedcbf380c631910.tar.gz ouroboros-ff3e622ce3f686c38848dcc3aedcbf380c631910.zip |
ipcpd: Fix CDAP return checks at enrollment
Diffstat (limited to 'src/ipcpd')
-rw-r--r-- | src/ipcpd/normal/enroll.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipcpd/normal/enroll.c b/src/ipcpd/normal/enroll.c index e2762993..3e6a0197 100644 --- a/src/ipcpd/normal/enroll.c +++ b/src/ipcpd/normal/enroll.c @@ -200,7 +200,7 @@ int enroll_boot(char * dst_name) clock_gettime(CLOCK_REALTIME, &t0); key = cdap_request_send(cdap, CDAP_READ, TIME_PATH, NULL, 0, 0); - if (key == NULL) { + if (key == NULL || key[0] == INVALID_CDAP_KEY) { log_err("Failed to send CDAP request."); cdap_destroy(cdap); flow_dealloc(conn.flow_info.fd); @@ -232,7 +232,7 @@ int enroll_boot(char * dst_name) free(data); key = cdap_request_send(cdap, CDAP_READ, boot_ro, NULL, 0, 0); - if (key == NULL) { + if (key == NULL || key[0] == INVALID_CDAP_KEY) { log_err("Failed to send CDAP request."); cdap_destroy(cdap); flow_dealloc(conn.flow_info.fd); @@ -263,7 +263,7 @@ int enroll_boot(char * dst_name) log_dbg("Packed information inserted into RIB."); key = cdap_request_send(cdap, CDAP_READ, members_ro, NULL, 0, 0); - if (key == NULL) { + if (key == NULL || key[0] == INVALID_CDAP_KEY) { log_err("Failed to send CDAP request."); cdap_destroy(cdap); flow_dealloc(conn.flow_info.fd); @@ -294,7 +294,7 @@ int enroll_boot(char * dst_name) log_dbg("Packed information inserted into RIB."); key = cdap_request_send(cdap, CDAP_READ, dif_ro, NULL, 0, 0); - if (key == NULL) { + if (key == NULL || key[0] == INVALID_CDAP_KEY) { log_err("Failed to send CDAP request."); cdap_destroy(cdap); flow_dealloc(conn.flow_info.fd); |