summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-05-15 16:32:09 +0200
committerSander Vrijders <[email protected]>2016-05-15 16:32:09 +0200
commit8f79d80e7fe7f52f310edddc73589f4f71457747 (patch)
treeb6d436026be8d4cd01c263217fcd07d96f484711 /src/lib/dev.c
parent061758159ebfd38fe03682bd3aa44cf9f8ac915f (diff)
parent990ac58472300955bf4d7a380539ef049791d013 (diff)
downloadouroboros-8f79d80e7fe7f52f310edddc73589f4f71457747.tar.gz
ouroboros-8f79d80e7fe7f52f310edddc73589f4f71457747.zip
Merged in dstaesse/ouroboros/release-fd (pull request #90)
lib: allow accepting any flows
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r--src/lib/dev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 55e4dc17..67c58702 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -249,9 +249,6 @@ int flow_accept(int fd,
irm_msg_t * recv_msg = NULL;
int cfd = -1;
- if (ap_name == NULL)
- return -1;
-
msg.code = IRM_MSG_CODE__IRM_FLOW_ACCEPT;
msg.has_pid = true;
@@ -270,12 +267,15 @@ int flow_accept(int fd,
return -1;
}
- *ap_name = strdup(recv_msg->ap_name);
- if (*ap_name == NULL) {
- irm_msg__free_unpacked(recv_msg, NULL);
- return -1;
+ if (ap_name != NULL) {
+ *ap_name = strdup(recv_msg->ap_name);
+ if (*ap_name == NULL) {
+ irm_msg__free_unpacked(recv_msg, NULL);
+ return -1;
+ }
}
+
if (ae_name != NULL) {
*ae_name = strdup(recv_msg->ae_name);
if (*ae_name == NULL) {