There is no reasonable way for the caller to respond to an error returned
by a -res primitive, the initiator is responsible for resending the
request. Change all CC -res primitives to return void.
Signed-off-by: Patrick McHardy <kaber@trash.net>
PP: CC-SETUP
FP: CC-CONNECT
results in:
src/timer.c:99: dect_timer_stop: assertion `timer->state == DECT_TIMER_RUNNING' failed.
#0 0xb76b1548 in dect_backtrace() from /home/kaber/dect/libdect/src/libdect.so.0 at debug.c:136
#1 0xb76b1614 in __dect_assert_fail() from /home/kaber/dect/libdect/src/libdect.so.0 at debug.c:148
#2 0xb76b0a85 in dect_timer_stop() from /home/kaber/dect/libdect/src/libdect.so.0 at timer.c:102
#3 0xb76a343c in dect_cc_rcv_connect() from /home/kaber/dect/libdect/src/libdect.so.0 at cc.c:1468
#4 0xb76a0162 in dect_ddl_rcv_msg() from /home/kaber/dect/libdect/src/libdect.so.0 at lce.c:746
#5 0xb76a039b in dect_lce_data_link_event() from /home/kaber/dect/libdect/src/libdect.so.0 at lce.c:898
#6 0xb76b04cf in dect_fd_process() from /home/kaber/dect/libdect/src/libdect.so.0 at io.c:132
#7 0xb7690bdf in event_del() from /usr/lib/libev.so.3 at ??:0
#8 0xb7689934 in ev_invoke_pending() from /usr/lib/libev.so.3 at ??:0
#9 0xb768ef34 in ev_loop() from /usr/lib/libev.so.3 at ??:0
#10 0xb7690874 in event_base_loop() from /usr/lib/libev.so.3 at ??:0
#11 0xb7690907 in event_loop() from /usr/lib/libev.so.3 at ??:0
#12 0x080496dd in dect_event_loop() from /proc/self/exe at event_ops.c:112
#13 0x0804b67c in main() from /proc/self/exe at pp-cc.c:88
Signed-off-by: Patrick McHardy <kaber@trash.net>
Perform protocol initialization outside of __init functions to avoid
multiple registration with threaded library users.
Signed-off-by: Patrick McHardy <kaber@trash.net>
A transaction only needs to be aborted for initiated transactions,
fix a segfault when calling (validly) non-existant callbacks.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Only destroy the link when invoking the MNCC_RELEASE-cfm primitive,
on MNCC_RELEASE-ind destruction happends in MNCC_RELEASE-res.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Set the IPUI of a data link as soon a request containing the portable_identity
is received. Additionally verify that the identity matches the IPUI if already
set.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Add definitions for the various libdect subsystems, pass them to the
registered debugging handlers and add a handler to the example programs
to colorize debugging messages.
Still could use some cleanup, but causes too many clashes.
Signed-off-by: Patrick McHardy <kaber@trash.net>
The standard is obviously broken: IEs may only occur in ascending order
of the numerical IDs, yet codec_list and call_information IEs are specified
to be placed *after* escape_for_proprietary IEs.
Other implementations apparently chose to disregard the specified order
and place those two IEs after escape_for_proprietary, so do this as well.
Signed-off-by: Patrick McHardy <kaber@trash.net>