summaryrefslogtreecommitdiff
path: root/src/libskabus/skabus_rpc_release.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libskabus/skabus_rpc_release.c')
-rw-r--r--src/libskabus/skabus_rpc_release.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libskabus/skabus_rpc_release.c b/src/libskabus/skabus_rpc_release.c
index d0a6875..80ad13e 100644
--- a/src/libskabus/skabus_rpc_release.c
+++ b/src/libskabus/skabus_rpc_release.c
@@ -12,7 +12,11 @@ int skabus_rpc_release (skabus_rpc_t *a, uint64_t serial)
{
uint32_t id ;
skabus_rpc_qinfo_t *p ;
- if (!avltree_search(&a->qmap, &serial, &id)) return 0 ;
+ if (!avltree_search(&a->qmap, &serial, &id))
+ {
+ if (errno == ESRCH) errno = EINVAL ;
+ return 0 ;
+ }
p = GENSETDYN_P(skabus_rpc_qinfo_t, &a->q, id) ;
if (p->status) return (errno = p->status, 0) ;
alloc_free(p->message.s) ;