mirror of https://github.com/sipwise/kamailio.git
parent
549b84e305
commit
9f52bf076b
@ -0,0 +1,31 @@
|
||||
From 4ac82cdf92ae6c0e2ff9c1238bfe28cfcefea99c Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Fri, 3 Jan 2014 10:04:39 +0100
|
||||
Subject: [PATCH] acc: added note about MySQL InnoDB not supporting INSERT
|
||||
DELAYED
|
||||
|
||||
- reported by Daniel Tryba
|
||||
|
||||
(cherry picked from commit d26eff22c8a543c63a40cd7d91bb3c70f04aabc6)
|
||||
---
|
||||
modules/acc/doc/acc_admin.xml | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/acc/doc/acc_admin.xml b/modules/acc/doc/acc_admin.xml
|
||||
index 97858be..33ca1f8 100644
|
||||
--- a/modules/acc/doc/acc_admin.xml
|
||||
+++ b/modules/acc/doc/acc_admin.xml
|
||||
@@ -1093,7 +1093,9 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
|
||||
<para>
|
||||
If set to 1, use INSERT DELAYED to add records to accounting tables
|
||||
when the DB driver has support for it. If no INSERT DELAYED support
|
||||
- is offered by DB driver, then standard INSERT is used.
|
||||
+ is offered by DB driver, then standard INSERT is used. Beware that
|
||||
+ MySQL InnoDB engine doesn't support INSERT DELAYED, thus be sure
|
||||
+ the acc tables are defined with different type (e.g., MyISAM).
|
||||
</para>
|
||||
<para>
|
||||
Default value is 0 (no INSERT DELAYED).
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 2ac00f9083846b958da5396cb4f5a51527957324 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Fri, 3 Jan 2014 10:11:26 +0100
|
||||
Subject: [PATCH] acc: regenerated README
|
||||
|
||||
---
|
||||
modules/acc/README | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/acc/README b/modules/acc/README
|
||||
index f6b1c5c..7a6361c 100644
|
||||
--- a/modules/acc/README
|
||||
+++ b/modules/acc/README
|
||||
@@ -1109,7 +1109,9 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
|
||||
|
||||
If set to 1, use INSERT DELAYED to add records to accounting tables
|
||||
when the DB driver has support for it. If no INSERT DELAYED support is
|
||||
- offered by DB driver, then standard INSERT is used.
|
||||
+ offered by DB driver, then standard INSERT is used. Beware that MySQL
|
||||
+ InnoDB engine doesn't support INSERT DELAYED, thus be sure the acc
|
||||
+ tables are defined with different type (e.g., MyISAM).
|
||||
|
||||
Default value is 0 (no INSERT DELAYED).
|
||||
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
From df0218611b8f27ccaa924b8f88560c2e81966823 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Thu, 2 Jan 2014 11:25:56 +0100
|
||||
Subject: [PATCH] tmrec: updated the examples with tmrec duration
|
||||
|
||||
- hint to read rfc2445 for duration format
|
||||
|
||||
(cherry picked from commit 99d1170469c60206992c083f2ba0e9dc6b580d37)
|
||||
---
|
||||
modules/tmrec/README | 8 ++++----
|
||||
modules/tmrec/doc/tmrec_admin.xml | 7 ++++---
|
||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules/tmrec/README b/modules/tmrec/README
|
||||
index 6cffee0..84b7a56 100644
|
||||
--- a/modules/tmrec/README
|
||||
+++ b/modules/tmrec/README
|
||||
@@ -138,7 +138,7 @@ modparam("tmrec", "separator", ";")
|
||||
subsequent intervals do not overlap. For non-recurring intervals,
|
||||
durations of any positive length are permitted. Zero-length
|
||||
duration means "forever". Negative-length durations are not
|
||||
- allowed.
|
||||
+ allowed. See RFC 2445 for the format of duration.
|
||||
* frequency - can be one of the following values: "daily" - specify
|
||||
repeating periods based on an interval of a day or more; "weekly" -
|
||||
specify repeating periods based on an interval of a week or more;
|
||||
@@ -222,9 +222,9 @@ modparam("tmrec", "separator", ";")
|
||||
|
||||
Example 1.2. tmrec_match usage
|
||||
...
|
||||
- if(tmrec_match("20120101T000000|24H|weekly|||SA,SU")
|
||||
+ if(tmrec_match("20120101T000000|PT24H|weekly|||SA,SU")
|
||||
xdbg("it is weekend!\n");
|
||||
- if(tmrec_match("20120101T083000|10H|weekly|||MO,TU,WE,TH,FR")
|
||||
+ if(tmrec_match("20120101T083000|PT10H|weekly|||MO,TU,WE,TH,FR")
|
||||
xdbg("it is with working hours\n");
|
||||
...
|
||||
|
||||
@@ -298,7 +298,7 @@ if(is_leap_year("2010"))
|
||||
|
||||
Example 1.4. time_period_match usage
|
||||
...
|
||||
-if(time_period_match("wd{1-5} hr{8-16}, wd{1-5} hr{17} min{0-29}"))
|
||||
+if(time_period_match("wd{2-6} hr{8-16}, wd{1-5} hr{17} min{0-29}"))
|
||||
xdbg("Monday to Friday, 8:00 to 17:30\n");
|
||||
|
||||
if(time_period_match("weekday { sat sun }, weekday {mo-fr} hr {17-8},wd{mo-wed}h
|
||||
diff --git a/modules/tmrec/doc/tmrec_admin.xml b/modules/tmrec/doc/tmrec_admin.xml
|
||||
index 782b1f1..7a429eb 100644
|
||||
--- a/modules/tmrec/doc/tmrec_admin.xml
|
||||
+++ b/modules/tmrec/doc/tmrec_admin.xml
|
||||
@@ -127,7 +127,8 @@ modparam("tmrec", "separator", ";")
|
||||
be small enough such that subsequent intervals do not overlap.
|
||||
For non-recurring intervals, durations of any positive length are
|
||||
permitted. Zero-length duration means <quote>forever</quote>.
|
||||
- Negative-length durations are not allowed.
|
||||
+ Negative-length durations are not allowed. See RFC 2445 for
|
||||
+ the format of duration.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
@@ -274,9 +275,9 @@ modparam("tmrec", "separator", ";")
|
||||
<title><function>tmrec_match</function> usage</title>
|
||||
<programlisting format="linespecific">
|
||||
...
|
||||
- if(tmrec_match("20120101T000000|24H|weekly|||SA,SU")
|
||||
+ if(tmrec_match("20120101T000000|PT24H|weekly|||SA,SU")
|
||||
xdbg("it is weekend!\n");
|
||||
- if(tmrec_match("20120101T083000|10H|weekly|||MO,TU,WE,TH,FR")
|
||||
+ if(tmrec_match("20120101T083000|PT10H|weekly|||MO,TU,WE,TH,FR")
|
||||
xdbg("it is with working hours\n");
|
||||
...
|
||||
</programlisting>
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
From fb364e0b29ce388574a61ebc4a428c559c411a2a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Dunkley <peter.dunkley@crocodile-rcs.com>
|
||||
Date: Sun, 5 Jan 2014 18:15:07 +0000
|
||||
Subject: [PATCH] modules/auth_ephemeral: added OpenSSL licensing exception
|
||||
|
||||
(cherry picked from commit 99960be1d55df2ba4ca596c42c8e78e36dad3cf1)
|
||||
---
|
||||
modules/auth_ephemeral/autheph_mod.c | 5 +++++
|
||||
modules/auth_ephemeral/autheph_mod.h | 5 +++++
|
||||
modules/auth_ephemeral/authorize.c | 5 +++++
|
||||
modules/auth_ephemeral/authorize.h | 5 +++++
|
||||
modules/auth_ephemeral/checks.c | 5 +++++
|
||||
modules/auth_ephemeral/checks.h | 5 +++++
|
||||
6 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/modules/auth_ephemeral/autheph_mod.c b/modules/auth_ephemeral/autheph_mod.c
|
||||
index 8e72fba..fb59e56 100644
|
||||
--- a/modules/auth_ephemeral/autheph_mod.c
|
||||
+++ b/modules/auth_ephemeral/autheph_mod.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#include "../../dprint.h"
|
||||
#include "../../locking.h"
|
||||
diff --git a/modules/auth_ephemeral/autheph_mod.h b/modules/auth_ephemeral/autheph_mod.h
|
||||
index 62bc808..3ad2356 100644
|
||||
--- a/modules/auth_ephemeral/autheph_mod.h
|
||||
+++ b/modules/auth_ephemeral/autheph_mod.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#ifndef AUTHEPH_MOD_H
|
||||
#define AUTHEPH_MOD_H
|
||||
diff --git a/modules/auth_ephemeral/authorize.c b/modules/auth_ephemeral/authorize.c
|
||||
index a09a9f8..454ecac 100644
|
||||
--- a/modules/auth_ephemeral/authorize.c
|
||||
+++ b/modules/auth_ephemeral/authorize.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
diff --git a/modules/auth_ephemeral/authorize.h b/modules/auth_ephemeral/authorize.h
|
||||
index 8ce9331..0a7bb91 100644
|
||||
--- a/modules/auth_ephemeral/authorize.h
|
||||
+++ b/modules/auth_ephemeral/authorize.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#ifndef AUTHORIZE_H
|
||||
#define AUTHORIZE_H
|
||||
diff --git a/modules/auth_ephemeral/checks.c b/modules/auth_ephemeral/checks.c
|
||||
index 447e997..dacec11 100644
|
||||
--- a/modules/auth_ephemeral/checks.c
|
||||
+++ b/modules/auth_ephemeral/checks.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#include "../../dprint.h"
|
||||
#include "../../mod_fix.h"
|
||||
diff --git a/modules/auth_ephemeral/checks.h b/modules/auth_ephemeral/checks.h
|
||||
index 27cb7fe..ee23c7e 100644
|
||||
--- a/modules/auth_ephemeral/checks.h
|
||||
+++ b/modules/auth_ephemeral/checks.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#ifndef CHECKS_H
|
||||
#define CHECKS_H
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
From bdb3a86c4453790a91de5aa2320de5b5bb26ad5c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Dunkley <peter.dunkley@crocodile-rcs.com>
|
||||
Date: Sun, 5 Jan 2014 18:15:33 +0000
|
||||
Subject: [PATCH] modules/outbound: added OpenSSL licensing exception
|
||||
|
||||
(cherry picked from commit 6741c47ad75806355cd7564d419df56acc68987b)
|
||||
---
|
||||
modules/outbound/api.h | 5 +++++
|
||||
modules/outbound/config.c | 5 +++++
|
||||
modules/outbound/config.h | 5 +++++
|
||||
modules/outbound/ob_mod.c | 5 +++++
|
||||
4 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/modules/outbound/api.h b/modules/outbound/api.h
|
||||
index fc0e8b9..facc1db 100644
|
||||
--- a/modules/outbound/api.h
|
||||
+++ b/modules/outbound/api.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#ifndef OB_API_H
|
||||
diff --git a/modules/outbound/config.c b/modules/outbound/config.c
|
||||
index bcb6fbb..5b291f4 100644
|
||||
--- a/modules/outbound/config.c
|
||||
+++ b/modules/outbound/config.c
|
||||
@@ -17,6 +17,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
/*!
|
||||
diff --git a/modules/outbound/config.h b/modules/outbound/config.h
|
||||
index 0410ff5..cf6796e 100644
|
||||
--- a/modules/outbound/config.h
|
||||
+++ b/modules/outbound/config.h
|
||||
@@ -17,6 +17,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
/*!
|
||||
diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
|
||||
index 9902e91..038c5fa 100644
|
||||
--- a/modules/outbound/ob_mod.c
|
||||
+++ b/modules/outbound/ob_mod.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/rand.h>
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,182 @@
|
||||
From 71463b06efa2997950aaf1ef088076258fe8a03a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Dunkley <peter.dunkley@crocodile-rcs.com>
|
||||
Date: Sun, 5 Jan 2014 18:16:04 +0000
|
||||
Subject: [PATCH] modules/websocket: added OpenSSL licensing exception
|
||||
|
||||
(cherry picked from commit 661d7d3a6231713861a8a1236dd7d783113c2890)
|
||||
---
|
||||
modules/websocket/config.c | 5 +++++
|
||||
modules/websocket/config.h | 5 +++++
|
||||
modules/websocket/ws_conn.c | 5 +++++
|
||||
modules/websocket/ws_conn.h | 5 +++++
|
||||
modules/websocket/ws_frame.c | 5 +++++
|
||||
modules/websocket/ws_frame.h | 5 +++++
|
||||
modules/websocket/ws_handshake.c | 5 +++++
|
||||
modules/websocket/ws_handshake.h | 5 +++++
|
||||
modules/websocket/ws_mod.c | 5 +++++
|
||||
modules/websocket/ws_mod.h | 5 +++++
|
||||
10 files changed, 50 insertions(+)
|
||||
|
||||
diff --git a/modules/websocket/config.c b/modules/websocket/config.c
|
||||
index e6e6a50..a0607a7 100644
|
||||
--- a/modules/websocket/config.c
|
||||
+++ b/modules/websocket/config.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
/*!
|
||||
diff --git a/modules/websocket/config.h b/modules/websocket/config.h
|
||||
index 690649e..64ed5bd 100644
|
||||
--- a/modules/websocket/config.h
|
||||
+++ b/modules/websocket/config.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
/*!
|
||||
diff --git a/modules/websocket/ws_conn.c b/modules/websocket/ws_conn.c
|
||||
index 613f14e..9f2b672 100644
|
||||
--- a/modules/websocket/ws_conn.c
|
||||
+++ b/modules/websocket/ws_conn.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#include "../../locking.h"
|
||||
diff --git a/modules/websocket/ws_conn.h b/modules/websocket/ws_conn.h
|
||||
index d022d0e..0c7d639 100644
|
||||
--- a/modules/websocket/ws_conn.h
|
||||
+++ b/modules/websocket/ws_conn.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#ifndef _WS_CONN_H
|
||||
diff --git a/modules/websocket/ws_frame.c b/modules/websocket/ws_frame.c
|
||||
index a3a4cef..3ccb4d1 100644
|
||||
--- a/modules/websocket/ws_frame.c
|
||||
+++ b/modules/websocket/ws_frame.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
diff --git a/modules/websocket/ws_frame.h b/modules/websocket/ws_frame.h
|
||||
index 1210c6c..815ec65 100644
|
||||
--- a/modules/websocket/ws_frame.h
|
||||
+++ b/modules/websocket/ws_frame.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#ifndef _WS_FRAME_H
|
||||
diff --git a/modules/websocket/ws_handshake.c b/modules/websocket/ws_handshake.c
|
||||
index c4e3143..05332e4 100644
|
||||
--- a/modules/websocket/ws_handshake.c
|
||||
+++ b/modules/websocket/ws_handshake.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#include <openssl/sha.h>
|
||||
diff --git a/modules/websocket/ws_handshake.h b/modules/websocket/ws_handshake.h
|
||||
index e7ff8e0..5c69fa2 100644
|
||||
--- a/modules/websocket/ws_handshake.h
|
||||
+++ b/modules/websocket/ws_handshake.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#ifndef _WS_HANDSHAKE_H
|
||||
diff --git a/modules/websocket/ws_mod.c b/modules/websocket/ws_mod.c
|
||||
index ec5e07c..8932769 100644
|
||||
--- a/modules/websocket/ws_mod.c
|
||||
+++ b/modules/websocket/ws_mod.c
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#include "../../dprint.h"
|
||||
diff --git a/modules/websocket/ws_mod.h b/modules/websocket/ws_mod.h
|
||||
index 819d3ea..8db9fef 100644
|
||||
--- a/modules/websocket/ws_mod.h
|
||||
+++ b/modules/websocket/ws_mod.h
|
||||
@@ -19,6 +19,11 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
+ * Exception: permission to copy, modify, propagate, and distribute a work
|
||||
+ * formed by combining OpenSSL toolkit software and the code in this file,
|
||||
+ * such as linking with software components and libraries released under
|
||||
+ * OpenSSL project license.
|
||||
+ *
|
||||
*/
|
||||
|
||||
#ifndef _WS_MOD_H
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
From 75e904f2c2034075383b412e2dcb18c6fb01c7c3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Thu, 2 Jan 2014 13:22:28 +0100
|
||||
Subject: [PATCH] htable: use pkg for temporary hash table slots used for
|
||||
reload
|
||||
|
||||
- free the temporary slots after reload, reported in FS#385
|
||||
|
||||
(cherry picked from commit 53689b55632c6208e6326f1a5f4b3c45da216f43)
|
||||
---
|
||||
modules/htable/htable.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/htable/htable.c b/modules/htable/htable.c
|
||||
index 1900ec5..6345b9e 100644
|
||||
--- a/modules/htable/htable.c
|
||||
+++ b/modules/htable/htable.c
|
||||
@@ -490,7 +490,7 @@ static struct mi_root* ht_mi_reload(struct mi_root* cmd_tree, void* param)
|
||||
return init_mi_tree( 500, "no such hash table", 18);
|
||||
}
|
||||
memcpy(&nht, ht, sizeof(ht_t));
|
||||
- nht.entries = (ht_entry_t*)shm_malloc(nht.htsize*sizeof(ht_entry_t));
|
||||
+ nht.entries = (ht_entry_t*)pkg_malloc(nht.htsize*sizeof(ht_entry_t));
|
||||
if(nht.entries == NULL)
|
||||
{
|
||||
ht_db_close_con();
|
||||
@@ -525,6 +525,7 @@ static struct mi_root* ht_mi_reload(struct mi_root* cmd_tree, void* param)
|
||||
ht_cell_free(it);
|
||||
}
|
||||
}
|
||||
+ pkg_free(nht.entries);
|
||||
ht_db_close_con();
|
||||
return init_mi_tree( 200, MI_OK_S, MI_OK_LEN);
|
||||
}
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
From 2b450f573bdbcb88d0418a43a6707875f050eb33 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Mon, 6 Jan 2014 22:46:48 +0100
|
||||
Subject: [PATCH] htable: use system malloc for temporary allocation of hash
|
||||
table realod slots
|
||||
|
||||
- copes better with large number of slots, without a need to use shm
|
||||
|
||||
(cherry picked from commit 13626ccffeaa7654c58576c3d1cc417dea865ca9)
|
||||
---
|
||||
modules/htable/htable.c | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules/htable/htable.c b/modules/htable/htable.c
|
||||
index 6345b9e..682b847 100644
|
||||
--- a/modules/htable/htable.c
|
||||
+++ b/modules/htable/htable.c
|
||||
@@ -490,7 +490,8 @@ static struct mi_root* ht_mi_reload(struct mi_root* cmd_tree, void* param)
|
||||
return init_mi_tree( 500, "no such hash table", 18);
|
||||
}
|
||||
memcpy(&nht, ht, sizeof(ht_t));
|
||||
- nht.entries = (ht_entry_t*)pkg_malloc(nht.htsize*sizeof(ht_entry_t));
|
||||
+ /* it's temporary operation - use system malloc */
|
||||
+ nht.entries = (ht_entry_t*)malloc(nht.htsize*sizeof(ht_entry_t));
|
||||
if(nht.entries == NULL)
|
||||
{
|
||||
ht_db_close_con();
|
||||
@@ -500,6 +501,18 @@ static struct mi_root* ht_mi_reload(struct mi_root* cmd_tree, void* param)
|
||||
|
||||
if(ht_db_load_table(&nht, &ht->dbtable, 0)<0)
|
||||
{
|
||||
+ /* free any entry set if it was a partial load */
|
||||
+ for(i=0; i<nht.htsize; i++)
|
||||
+ {
|
||||
+ first = nht.entries[i].first;
|
||||
+ while(first)
|
||||
+ {
|
||||
+ it = first;
|
||||
+ first = first->next;
|
||||
+ ht_cell_free(it);
|
||||
+ }
|
||||
+ }
|
||||
+ free(nht.entries);
|
||||
ht_db_close_con();
|
||||
return init_mi_tree(500, MI_ERR_RELOAD, MI_ERR_RELOAD_LEN);
|
||||
}
|
||||
@@ -525,7 +538,7 @@ static struct mi_root* ht_mi_reload(struct mi_root* cmd_tree, void* param)
|
||||
ht_cell_free(it);
|
||||
}
|
||||
}
|
||||
- pkg_free(nht.entries);
|
||||
+ free(nht.entries);
|
||||
ht_db_close_con();
|
||||
return init_mi_tree( 200, MI_OK_S, MI_OK_LEN);
|
||||
}
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
From 3bfb9030dda5776744efc4f408557e044b4ebb75 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Mon, 6 Jan 2014 22:52:11 +0100
|
||||
Subject: [PATCH] htable: free temporary slots used to reload hash table via
|
||||
rpc command
|
||||
|
||||
- use system memory for temporary slots
|
||||
|
||||
(cherry picked from commit f35c49085bdcc623ef45aa33a99af3265d3e6eeb)
|
||||
---
|
||||
modules/htable/htable.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/htable/htable.c b/modules/htable/htable.c
|
||||
index 682b847..ab2ecea 100644
|
||||
--- a/modules/htable/htable.c
|
||||
+++ b/modules/htable/htable.c
|
||||
@@ -1049,7 +1049,8 @@ static void htable_rpc_reload(rpc_t* rpc, void* c)
|
||||
|
||||
|
||||
memcpy(&nht, ht, sizeof(ht_t));
|
||||
- nht.entries = (ht_entry_t*)shm_malloc(nht.htsize*sizeof(ht_entry_t));
|
||||
+ /* it's temporary operation - use system malloc */
|
||||
+ nht.entries = (ht_entry_t*)malloc(nht.htsize*sizeof(ht_entry_t));
|
||||
if(nht.entries == NULL)
|
||||
{
|
||||
ht_db_close_con();
|
||||
@@ -1060,6 +1061,18 @@ static void htable_rpc_reload(rpc_t* rpc, void* c)
|
||||
|
||||
if(ht_db_load_table(&nht, &ht->dbtable, 0)<0)
|
||||
{
|
||||
+ /* free any entry set if it was a partial load */
|
||||
+ for(i=0; i<nht.htsize; i++)
|
||||
+ {
|
||||
+ first = nht.entries[i].first;
|
||||
+ while(first)
|
||||
+ {
|
||||
+ it = first;
|
||||
+ first = first->next;
|
||||
+ ht_cell_free(it);
|
||||
+ }
|
||||
+ }
|
||||
+ free(nht.entries);
|
||||
ht_db_close_con();
|
||||
rpc->fault(c, 500, "Mtree reload failed");
|
||||
return;
|
||||
@@ -1086,6 +1099,7 @@ static void htable_rpc_reload(rpc_t* rpc, void* c)
|
||||
ht_cell_free(it);
|
||||
}
|
||||
}
|
||||
+ free(nht.entries);
|
||||
ht_db_close_con();
|
||||
return;
|
||||
}
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
From f97723dd17d5bf9e0d2dd02982cfbca0146b7e99 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel-Constantin Mierla <miconda@gmail.com>
|
||||
Date: Mon, 6 Jan 2014 23:11:33 +0100
|
||||
Subject: [PATCH] websocket: store sub protocol value for later use in
|
||||
encode_and_send_ws_frame()
|
||||
|
||||
- the ws connection pointer can be set null if the browser closes the
|
||||
connection
|
||||
- patch by Vitaliy Aleksandrov, FS#364
|
||||
|
||||
(cherry picked from commit 438eafc92ecf9d3b52f95c9952bc26b147fdf328)
|
||||
---
|
||||
modules/websocket/ws_frame.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules/websocket/ws_frame.c b/modules/websocket/ws_frame.c
|
||||
index 3ccb4d1..ba0713b 100644
|
||||
--- a/modules/websocket/ws_frame.c
|
||||
+++ b/modules/websocket/ws_frame.c
|
||||
@@ -141,6 +141,7 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
|
||||
struct dest_info dst;
|
||||
union sockaddr_union *from = NULL;
|
||||
union sockaddr_union local_addr;
|
||||
+ int sub_proto;
|
||||
|
||||
LM_DBG("encoding WebSocket frame\n");
|
||||
|
||||
@@ -166,6 +167,8 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ sub_proto = frame->wsc->sub_protocol;
|
||||
+
|
||||
switch(frame->opcode)
|
||||
{
|
||||
case OPCODE_TEXT_FRAME:
|
||||
@@ -299,9 +302,9 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
|
||||
LM_ERR("sending WebSocket frame\n");
|
||||
pkg_free(send_buf);
|
||||
update_stat(ws_failed_connections, 1);
|
||||
- if (frame->wsc->sub_protocol == SUB_PROTOCOL_SIP)
|
||||
+ if (sub_proto == SUB_PROTOCOL_SIP)
|
||||
update_stat(ws_sip_failed_connections, 1);
|
||||
- else if (frame->wsc->sub_protocol == SUB_PROTOCOL_MSRP)
|
||||
+ else if (sub_proto == SUB_PROTOCOL_MSRP)
|
||||
update_stat(ws_msrp_failed_connections, 1);
|
||||
if (wsconn_rm(frame->wsc, WSCONN_EVENTROUTE_YES) < 0)
|
||||
LM_ERR("removing WebSocket connection\n");
|
||||
--
|
||||
1.8.5.2
|
||||
|
||||
Loading…
Reference in new issue