From d705f9f9e66aeeb9958fdbcaa66e60276d0918f9 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 14 Jul 2018 21:32:12 +0300 Subject: [PATCH] added reg.c-patch file --- README.md | 4 +++- reg.c-patch | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 reg.c-patch diff --git a/README.md b/README.md index 2850e647..3e46d107 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ Currently includes TLS transport, PCMU/PCMA and opus codecs, as well as ZRTP and (DTLS) SRTP media encapsulation. The static libraries and include files in distribution directory have -been produced using https://github.com/alfredh/baresip-android. +been produced using https://github.com/alfredh/baresip-android after +applying reg.c-patch to re/src/sipreg/reg.c. The patch is needed due to +re timer sometimes firing too late. After cloning the project, in android-studio: diff --git a/reg.c-patch b/reg.c-patch new file mode 100644 index 00000000..1e1f2bea --- /dev/null +++ b/reg.c-patch @@ -0,0 +1,19 @@ +*** /usr/src/orig/re/src/sipreg/reg.c 2018-07-14 21:21:09.622850976 +0300 +--- reg.c 2018-07-14 21:22:01.979133613 +0300 +*************** +*** 188,194 **** + reg->wait = reg->expires; + sip_msg_hdr_apply(msg, true, SIP_HDR_CONTACT, contact_handler, + reg); +! reg->wait *= 900; + reg->failc = 0; + + if (reg->regid > 0 && !reg->terminated && !reg->ka) +--- 188,194 ---- + reg->wait = reg->expires; + sip_msg_hdr_apply(msg, true, SIP_HDR_CONTACT, contact_handler, + reg); +! reg->wait *= 200; + reg->failc = 0; + + if (reg->regid > 0 && !reg->terminated && !reg->ka)