summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-03-31 20:35:11 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-31 20:35:11 +0200
commit2410108f3226f08e0ee0ec1040e0a71e37452b8c (patch)
treeb4be4b06a1bc315dc6b634b8bf2c6499e96c209b /src
parentf36d6ea8606e30bbd87bb201c3d4d03947c59e6b (diff)
downloadouroboros-2410108f3226f08e0ee0ec1040e0a71e37452b8c.tar.gz
ouroboros-2410108f3226f08e0ee0ec1040e0a71e37452b8c.zip
ipcpd: Fix CDAP return checks at enrollment
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/normal/enroll.c8
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);