summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r--src/lib/dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 19bc90e5..d85afc45 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -93,7 +93,7 @@ int ap_init(char * ap_name)
for (i = 0; i < AP_MAX_FLOWS; ++i) {
_ap_instance->flows[i].rb = NULL;
_ap_instance->flows[i].port_id = -1;
- _ap_instance->flows[i].api = 0; /* API_INVALID */
+ _ap_instance->flows[i].api = -1;
}
pthread_rwlock_init(&_ap_instance->flows_lock, NULL);
@@ -397,7 +397,7 @@ int flow_dealloc(int fd)
_ap_instance->flows[fd].port_id = -1;
shm_ap_rbuff_close(_ap_instance->flows[fd].rb);
_ap_instance->flows[fd].rb = NULL;
- _ap_instance->flows[fd].api = 0;
+ _ap_instance->flows[fd].api = -1;
bmp_release(_ap_instance->fds, fd);
@@ -543,7 +543,7 @@ ssize_t flow_read(int fd, void * buf, size_t count)
if (_ap_instance->flows[fd].oflags & FLOW_O_NONBLOCK) {
idx = shm_ap_rbuff_read_port(_ap_instance->rb,
- _ap_instance->flows[fd].port_id);
+ _ap_instance->flows[fd].port_id);
} else { /* block */
while ((idx =
shm_ap_rbuff_read_port(_ap_instance->rb,