summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2011-03-20 03:41:50 +0100
committerPatrick McHardy <kaber@trash.net>2011-03-20 03:41:50 +0100
commit1f428e713982182aeb47fa0ed010fc6a212eb037 (patch)
tree36b4e8bfc834e27030062847bbea80ab0ae81fa4
parent8a59a4cd9d732a546998471d3ffa3d4f0ebc28b7 (diff)
lce: attempt to support transactions only consisting of a single message
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--src/lce.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/lce.c b/src/lce.c
index b8f8619..996ae52 100644
--- a/src/lce.c
+++ b/src/lce.c
@@ -1632,8 +1632,23 @@ void dect_transaction_close(struct dect_handle *dh, struct dect_transaction *ta,
if (!list_empty(&ddl->transactions))
break;
case DECT_DATA_LINK_ESTABLISH_PENDING:
- /* link establishment was unsucessful */
- return dect_ddl_destroy(dh, ddl);
+ /* 14.2 states: "If a higher entity releases a call, whilst the
+ * initial messages are still queued, the queued messages shall
+ * be discarded, and the link establishment shall be immediately
+ * terminated".
+ *
+ * The term "call" is used ambiguously though, in order to support
+ * transactions that only send a single message and immediately
+ * close the transaction again, a call is interpreted to only
+ * refer to CC and COMS instances.
+ *
+ * In case of other higher layer protocols we wait until link
+ * establishment has succeeded or timed out.
+ */
+ if (ta->pd == DECT_PD_CC || ta->pd == DECT_PD_COMS)
+ return dect_ddl_destroy(dh, ddl);
+ else
+ return;
default:
break;
}