[PATCH 2/2] offchannel: always use -ECANCELED for cancelation

James Prestwood
2021-12-16T18:00:03Z

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

info->error gets reset to zero on a successful ROC callback
which was getting used for cancelation.
---
src/offchannel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/offchannel.c b/src/offchannel.c
index 4db3fcf2..e01f76c7 100644
--- a/src/offchannel.c
+++ b/src/offchannel.c
@@ -231,7 +231,7 @@ void offchannel_cancel(uint64_t wdev_id, uint32_t id)

destroy:
if (info->destroy)
- info->destroy(info->error, info->user_data);
+ info->destroy(-ECANCELED, info->user_data);

info->destroy = NULL;
info->started = NULL;
--
2.31.1