[opensips] Ver. 1.8.0
Peter Lemenkov
peter at fedoraproject.org
Tue Jul 3 13:18:11 UTC 2012
commit e73f7b59b473e4ddb677ae78b52fdb43f1854143
Author: Peter Lemenkov <lemenkov at gmail.com>
Date: Tue Jul 3 17:18:03 2012 +0400
Ver. 1.8.0
Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
.gitignore | 1 +
...ps-0001-Check-for-stale-nonce-in-pre_auth.patch | 70 ---
...edora-Improve-packaging-for-Fedora-RHEL-a.patch | 91 +++
...-unknown-options-to-be-passed-to-rtpproxy.patch | 31 -
opensips-0002-backport-from-trunk-rev-9099.patch | 27 +
opensips-0003-Backported-from-trunk-rev-9121.patch | 40 ++
opensips-0004-db_oracle-typo-fixes.patch | 129 ++++
...sips-0005-Drop-rpath-from-Oracle-s-module.patch | 42 ++
opensips-0006-Clean-Makefile-for-Oracle.patch | 72 +++
...-Don-t-fetch-the-last-record-use-next-one.patch | 26 +
opensips-0008-Fix-SQL-types.patch | 58 ++
...n-types-to-NULL-upon-freeing-resultset-co.patch | 25 +
opensips-0010-fixed-DB-type-inconsistency.patch | 30 +
opensips-0011-Proper-memory-zeroing.patch | 27 +
...ips-0012-Free-columns-data-only-in-Oracle.patch | 35 ++
...-async-Oracle-operations-they-didn-t-work.patch | 610 ++++++++++++++++++++
opensips.service | 14 -
opensips.spec | 224 +++++---
opensips.sysconfig | 2 -
opensips.tmpfiles.conf | 1 -
sources | 2 +-
21 files changed, 1353 insertions(+), 204 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 03666aa..dd193d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ opensips-1.6.3-tls_src.tar.gz
/opensips-1.7.0_src.tar.gz
/opensips-1.7.1_src.tar.gz
/opensips-1.7.2_src.tar.gz
+/opensips-1.8.0-beta_src.tar.gz
diff --git a/opensips-0001-packaging-fedora-Improve-packaging-for-Fedora-RHEL-a.patch b/opensips-0001-packaging-fedora-Improve-packaging-for-Fedora-RHEL-a.patch
new file mode 100644
index 0000000..d47b84e
--- /dev/null
+++ b/opensips-0001-packaging-fedora-Improve-packaging-for-Fedora-RHEL-a.patch
@@ -0,0 +1,91 @@
+From d5de2e7015ec76de01d500c718e36cab77266ebf Mon Sep 17 00:00:00 2001
+From: osas <osas at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Tue, 26 Jun 2012 14:53:42 +0000
+Subject: [PATCH 01/13] packaging/fedora: Improve packaging for Fedora/RHEL
+ and derivatives - closes bug id: 3535148 - backport
+ from trunk rev 9114 - backport from trunk rev 9115
+
+---
+ packaging/fedora/opensips.init | 8 ++++----
+ packaging/fedora/opensips.service | 14 ++++++++++++++
+ packaging/fedora/opensips.sysconfig | 2 ++
+ packaging/fedora/opensips.tmpfiles.conf | 1 +
+ 4 files changed, 21 insertions(+), 4 deletions(-)
+ create mode 100644 packaging/fedora/opensips.service
+ create mode 100644 packaging/fedora/opensips.sysconfig
+ create mode 100644 packaging/fedora/opensips.tmpfiles.conf
+
+diff --git a/packaging/fedora/opensips.init b/packaging/fedora/opensips.init
+index 1489b55..7e8ac40 100644
+--- a/packaging/fedora/opensips.init
++++ b/packaging/fedora/opensips.init
+@@ -34,11 +34,11 @@ start() {
+ echo -n $"Starting $prog: "
+
+ # check whether OpenSIPs was already started
+- if status $prog > /dev/null 2>&1 ; then
++ if status -p $pidfile $prog > /dev/null 2>&1 ; then
+ echo -n "already running" && warning && echo
+ return 0
+ fi
+-
++
+ # there is something at end of this output which is needed to
+ # report proper [ OK ] status in Fedora scripts
+ daemon $oser -P $pidfile -f $configfile $OPTIONS 2>/dev/null | tail -1
+@@ -51,7 +51,7 @@ start() {
+ stop() {
+ echo -n $"Stopping $prog: "
+ # check whether OpenSIPs is running
+- if ! status $prog > /dev/null 2>&1 ; then
++ if ! status -p $pidfile $prog > /dev/null 2>&1 ; then
+ echo -n "not running" && warning && echo
+ return 0
+ fi
+@@ -72,7 +72,7 @@ case "$1" in
+ stop
+ ;;
+ status)
+- status $prog
++ status -p $pidfile $prog
+ RETVAL=$?
+ ;;
+ restart|reload)
+diff --git a/packaging/fedora/opensips.service b/packaging/fedora/opensips.service
+new file mode 100644
+index 0000000..c69f164
+--- /dev/null
++++ b/packaging/fedora/opensips.service
+@@ -0,0 +1,14 @@
++[Unit]
++Description=OpenSIPS is a very fast and flexible SIP (RFC3261) server
++After=network.target mysqld.service postgresql.service rtpproxy.service
++
++[Service]
++Type=forking
++User=opensips
++Group=opensips
++EnvironmentFile=-/etc/sysconfig/opensips
++PIDFile=/var/run/opensips/opensips.pid
++ExecStart=/usr/sbin/opensips -P /var/run/opensips/opensips.pid -f /etc/opensips/opensips.cfg $OPTIONS
++
++[Install]
++WantedBy=multi-user.target
+diff --git a/packaging/fedora/opensips.sysconfig b/packaging/fedora/opensips.sysconfig
+new file mode 100644
+index 0000000..78dd88f
+--- /dev/null
++++ b/packaging/fedora/opensips.sysconfig
+@@ -0,0 +1,2 @@
++# Add extra options here
++OPTIONS=""
+diff --git a/packaging/fedora/opensips.tmpfiles.conf b/packaging/fedora/opensips.tmpfiles.conf
+new file mode 100644
+index 0000000..16f9031
+--- /dev/null
++++ b/packaging/fedora/opensips.tmpfiles.conf
+@@ -0,0 +1 @@
++d /var/run/opensips 0755 opensips opensips
+--
+1.7.10.4
+
diff --git a/opensips-0002-backport-from-trunk-rev-9099.patch b/opensips-0002-backport-from-trunk-rev-9099.patch
new file mode 100644
index 0000000..9395d3b
--- /dev/null
+++ b/opensips-0002-backport-from-trunk-rev-9099.patch
@@ -0,0 +1,27 @@
+From 3fe207bbb9c719abd5483188e4cffa847c510b4c Mon Sep 17 00:00:00 2001
+From: vladut-paiu <vladut-paiu at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Thu, 14 Jun 2012 09:56:13 +0000
+Subject: [PATCH 02/13] backport from trunk (rev #9099)
+
+removed call to ns_get16 glibc private function
+Credits to Peter Lemenkov
+---
+ resolve.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/resolve.c b/resolve.c
+index 57c1538..d4fd2d7 100644
+--- a/resolve.c
++++ b/resolve.c
+@@ -205,7 +205,7 @@ int get_dns_answer(union dns_query *answer,int anslen,char *qname,int qtype,int
+ if (ttl<*min_ttl)
+ *min_ttl=ttl;
+ cp +=4;
+- n = ns_get16(cp);
++ n = dns_get16(cp);
+ cp += 2; /* len */
+ BOUNDS_CHECK(cp, n);
+ erdata = cp + n;
+--
+1.7.10.4
+
diff --git a/opensips-0003-Backported-from-trunk-rev-9121.patch b/opensips-0003-Backported-from-trunk-rev-9121.patch
new file mode 100644
index 0000000..85e7392
--- /dev/null
+++ b/opensips-0003-Backported-from-trunk-rev-9121.patch
@@ -0,0 +1,40 @@
+From d22103a9f14dc7b2f3fe4074d1b14c1d7f9cab6a Mon Sep 17 00:00:00 2001
+From: razvancrainea <razvancrainea at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Wed, 27 Jun 2012 12:59:06 +0000
+Subject: [PATCH 03/13] Backported from trunk (rev# 9121): Fixed NICER
+ variable
+
+---
+ Makefile | 2 +-
+ Makefile.defs | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e52eafc..c787a04 100644
+--- a/Makefile
++++ b/Makefile
+@@ -35,7 +35,7 @@
+ #TLS=1
+ #SCTP=1
+ #FREERADIUS=1
+-NICER=1
++NICER?=1
+ auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
+
+ #include source related defs
+diff --git a/Makefile.defs b/Makefile.defs
+index 8c02405..b585716 100644
+--- a/Makefile.defs
++++ b/Makefile.defs
+@@ -140,7 +140,7 @@ endif
+ # nicer compilation?
+ Q=
+ NICER ?=
+-ifneq ($(NICER),)
++ifeq ($(NICER),1)
+ export Q=@
+ endif
+
+--
+1.7.10.4
+
diff --git a/opensips-0004-db_oracle-typo-fixes.patch b/opensips-0004-db_oracle-typo-fixes.patch
new file mode 100644
index 0000000..6679f3d
--- /dev/null
+++ b/opensips-0004-db_oracle-typo-fixes.patch
@@ -0,0 +1,129 @@
+From 6bd50b3eaff70e299f4ee6489d6ebf8b327d2480 Mon Sep 17 00:00:00 2001
+From: osas <osas at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Tue, 26 Jun 2012 14:41:27 +0000
+Subject: [PATCH 04/13] db_oracle: typo fixes - closes bug id: 3535168 -
+ backport from trunk rev 9116
+
+---
+ modules/db_oracle/db_oracle.c | 2 +-
+ modules/db_oracle/res.c | 22 +++++++++++-----------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/modules/db_oracle/db_oracle.c b/modules/db_oracle/db_oracle.c
+index 4796440..70cfe40 100644
+--- a/modules/db_oracle/db_oracle.c
++++ b/modules/db_oracle/db_oracle.c
+@@ -60,7 +60,7 @@ static param_export_t params[] = {
+
+
+ struct module_exports exports = {
+- "oracle",
++ "db_oracle",
+ MODULE_VERSION,
+ DEFAULT_DLFLAGS, /* dlopen flags */
+ cmds,
+diff --git a/modules/db_oracle/res.c b/modules/db_oracle/res.c
+index 12a6480..3230721 100644
+--- a/modules/db_oracle/res.c
++++ b/modules/db_oracle/res.c
+@@ -84,7 +84,7 @@ static int get_columns(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
+ }
+
+ if (db_allocate_columns(_r, n) != 0) {
+- LM_ERR("could not allocate columns");
++ LM_ERR("could not allocate columns\n");
+ return -4;
+ }
+ memset(RES_NAMES(_r), 0, sizeof(db_key_t) * n);
+@@ -126,14 +126,14 @@ static int get_columns(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
+ switch (dtype) {
+ case SQLT_UIN: /* unsigned integer */
+ set_bitmap:
+- LM_DBG("use DB_BITMAP type");
++ LM_DBG("use DB_BITMAP type\n");
+ RES_TYPES(_r)[i] = DB_BITMAP;
+ len = sizeof(VAL_BITMAP((db_val_t*)NULL));
+ break;
+
+ case SQLT_INT: /* (ORANET TYPE) integer */
+ set_int:
+- LM_DBG("use DB_INT result type");
++ LM_DBG("use DB_INT result type\n");
+ RES_TYPES(_r)[i] = DB_INT;
+ len = sizeof(VAL_INT((db_val_t*)NULL));
+ break;
+@@ -159,7 +159,7 @@ set_int:
+ goto set_bitmap;
+ }
+ }
+- LM_DBG("use DB_BIGINT result type");
++ LM_DBG("use DB_BIGINT result type\n");
+ RES_TYPES(_r)[i] = DB_BIGINT;
+ len = sizeof(VAL_BIGINT((db_val_t*)NULL));
+ dtype = SQLT_NUM;
+@@ -171,7 +171,7 @@ set_int:
+ case SQLT_IBFLOAT: /* binary float canonical */
+ case SQLT_IBDOUBLE: /* binary double canonical */
+ case SQLT_PDN: /* (ORANET TYPE) Packed Decimal Numeric */
+- LM_DBG("use DB_DOUBLE result type");
++ LM_DBG("use DB_DOUBLE result type\n");
+ RES_TYPES(_r)[i] = DB_DOUBLE;
+ len = sizeof(VAL_DOUBLE((db_val_t*)NULL));
+ dtype = SQLT_FLT;
+@@ -187,7 +187,7 @@ set_int:
+ case SQLT_TIMESTAMP_LTZ:/* TIMESTAMP WITH LOCAL TZ */
+ // case SQLT_INTERVAL_YM: /* INTERVAL YEAR TO MONTH */
+ // case SQLT_INTERVAL_DS: /* INTERVAL DAY TO SECOND */
+- LM_DBG("use DB_DATETIME result type");
++ LM_DBG("use DB_DATETIME result type\n");
+ RES_TYPES(_r)[i] = DB_DATETIME;
+ len = sizeof(OCIDate);
+ dtype = SQLT_ODT;
+@@ -199,7 +199,7 @@ set_int:
+ // case SQLT_CFILEE: /* character file lob */
+ // case SQLT_BIN: /* binary data(DTYBIN) */
+ // case SQLT_LBI: /* long binary */
+- LM_DBG("use DB_BLOB result type");
++ LM_DBG("use DB_BLOB result type\n");
+ RES_TYPES(_r)[i] = DB_BLOB;
+ goto dyn_str;
+
+@@ -210,7 +210,7 @@ set_int:
+ case SQLT_AFC: /* Ansi fixed char */
+ case SQLT_AVC: /* Ansi Var char */
+ // case SQLT_RID: /* rowid */
+- LM_DBG("use DB_STR result type");
++ LM_DBG("use DB_STR result type\n");
+ RES_TYPES(_r)[i] = DB_STR;
+ dyn_str:
+ dtype = SQLT_CHR;
+@@ -220,7 +220,7 @@ dyn_str:
+ con->errhp);
+ if (status != OCI_SUCCESS) goto ora_err;
+ if (len >= 4000) {
+- LM_DBG("use DB_BLOB result type");
++ LM_DBG("use DB_BLOB result type\n");
+ RES_TYPES(_r)[i] = DB_BLOB;
+ }
+ ++len;
+@@ -243,7 +243,7 @@ dyn_str:
+ #error
+ #endif
+ if (tsz > 65536) {
+- LM_ERR("Row size exceed 65K. IOB's are not supported");
++ LM_ERR("Row size exceed 65K. IOB's are not supported\n");
+ goto stop_load;
+ }
+ return 0;
+@@ -399,7 +399,7 @@ static int get_rows(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
+
+ while ( 1 ) {
+ if (convert_row(_r, &RES_ROWS(_r)[--rcnt], _d) < 0) {
+- LM_ERR("erroc convert row\n");
++ LM_ERR("error convert row\n");
+ goto stop_load;
+ }
+
+--
+1.7.10.4
+
diff --git a/opensips-0005-Drop-rpath-from-Oracle-s-module.patch b/opensips-0005-Drop-rpath-from-Oracle-s-module.patch
new file mode 100644
index 0000000..796019c
--- /dev/null
+++ b/opensips-0005-Drop-rpath-from-Oracle-s-module.patch
@@ -0,0 +1,42 @@
+From 2bd1b8d6b84f7e34adf802ffeec2cc0bd0247104 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Thu, 14 Jun 2012 11:38:48 +0400
+Subject: [PATCH 05/13] Drop rpath from Oracle's module
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ modules/db_oracle/Makefile | 4 ----
+ utils/db_oracle/Makefile | 4 ----
+ 2 files changed, 8 deletions(-)
+
+diff --git a/modules/db_oracle/Makefile b/modules/db_oracle/Makefile
+index 6b7e685..3a240f4 100644
+--- a/modules/db_oracle/Makefile
++++ b/modules/db_oracle/Makefile
+@@ -55,8 +55,4 @@ LIBS +=-locci -lclntsh
+ #DEFS+=-DLINUX -D_GNU_SOURCE -D_REENTRANT
+ #LIBS+=-lpthread
+
+-ifneq ($(ORAPATH),)
+- LIBS +=-Wl,-rpath $(ORAPATH)
+-endif
+-
+ include ../../Makefile.modules
+diff --git a/utils/db_oracle/Makefile b/utils/db_oracle/Makefile
+index b1c8231..edf1a3b 100644
+--- a/utils/db_oracle/Makefile
++++ b/utils/db_oracle/Makefile
+@@ -57,10 +57,6 @@ LIBS +=-locci -lclntsh
+ #DEFS +=-DLINUX -D_GNU_SOURCE -D_REENTRANT
+ #LIBS +=-lpthread
+
+-ifneq ($(ORAPATH),)
+- LIBS +=-Wl,-rpath $(ORAPATH)
+-endif
+-
+ include ../../Makefile.rules
+
+ modules:
+--
+1.7.10.4
+
diff --git a/opensips-0006-Clean-Makefile-for-Oracle.patch b/opensips-0006-Clean-Makefile-for-Oracle.patch
new file mode 100644
index 0000000..5fd1cfd
--- /dev/null
+++ b/opensips-0006-Clean-Makefile-for-Oracle.patch
@@ -0,0 +1,72 @@
+From dd96303016e7fd149a7a3da3db09f2e6db5c384b Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Thu, 14 Jun 2012 11:39:39 +0400
+Subject: [PATCH 06/13] Clean Makefile for Oracle
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ modules/db_oracle/Makefile | 48 +-------------------------------------------
+ 1 file changed, 1 insertion(+), 47 deletions(-)
+
+diff --git a/modules/db_oracle/Makefile b/modules/db_oracle/Makefile
+index 3a240f4..a8f099e 100644
+--- a/modules/db_oracle/Makefile
++++ b/modules/db_oracle/Makefile
+@@ -6,53 +6,7 @@ include ../../Makefile.defs
+ auto_gen=
+ NAME=db_oracle.so
+
+-# can be defined for non standard placement of oracle so's
+-ORAPATH=
+-LIBS=
+-
+-# use for multiple client sdk version install
+-ifneq ($(ORAVERSION),)
+- ORAVERDIR=/$(ORAVERSION)
+-endif
+-
+-# use include/library path's for full client installation
+-ifneq ($(ORAHOME),)
+- DEFS +=-I$(ORAHOME)/include
+- LIBS +=-L$(ORAHOME)/lib
+-ifeq ($(ORAPATH),)
+- ORAPATH=$(ORAHOME)/lib
+-endif
+-else
+-# use standard know paths oci.h locations (linux)
+-DEFS +=-I$(LOCALBASE)/include/oracle$(ORAVERDIR) \
+- -I$(SYSBASE)/include/oracle$(ORAVERDIR)
+-endif
+-
+-# search 'so' path if it non standard (possible liboclntsh locations on linux)
+-ifeq ($(ORAPATH),)
+- ORAPATH=$(shell [ -f $(LOCALBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
+- echo $(LOCALBASE)/lib64/oracle$(ORAVERDIR) )
+-endif
+-ifeq ($(ORAPATH),)
+- ORAPATH=$(shell [ -f $(SYSBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
+- echo $(SYSBASE)/lib64/oracle$(ORAVERDIR) )
+-endif
+-ifeq ($(ORAPATH),)
+- ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
+- echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
+-endif
+-ifeq ($(ORAPATH),)
+- ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
+- echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
+-endif
+-
+-ifneq ($(ORAPATH),)
+- LIBS +=-L$(ORAPATH)
+-endif
+-
++DEFS +=-I$(ORAHOME)/include
+ LIBS +=-locci -lclntsh
+
+-#DEFS+=-DLINUX -D_GNU_SOURCE -D_REENTRANT
+-#LIBS+=-lpthread
+-
+ include ../../Makefile.modules
+--
+1.7.10.4
+
diff --git a/opensips-0007-Don-t-fetch-the-last-record-use-next-one.patch b/opensips-0007-Don-t-fetch-the-last-record-use-next-one.patch
new file mode 100644
index 0000000..ede76ce
--- /dev/null
+++ b/opensips-0007-Don-t-fetch-the-last-record-use-next-one.patch
@@ -0,0 +1,26 @@
+From 2cb25437a2bc3f4e5b11ec3234f40dd98d9bdca1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A1=D0=B0=D0=BC=D1?=
+ =?UTF-8?q?=83=D1=81=D0=B5=D0=BD=D0=BA=D0=BE?= <samusenko at msm.ru>
+Date: Thu, 14 Jun 2012 11:52:01 +0400
+Subject: [PATCH 07/13] Don't fetch the last record - use next one
+
+---
+ modules/db_oracle/res.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/db_oracle/res.c b/modules/db_oracle/res.c
+index 3230721..1a0f9fe 100644
+--- a/modules/db_oracle/res.c
++++ b/modules/db_oracle/res.c
+@@ -370,7 +370,7 @@ static int get_rows(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
+ // timelimited operation
+ status = begin_timelimit(con, 0);
+ if (status != OCI_SUCCESS) goto ora_err;
+- do status = OCIStmtFetch2(_c, con->errhp, 1, OCI_FETCH_LAST, 0,
++ do status = OCIStmtFetch2(_c, con->errhp, 1, OCI_FETCH_NEXT, 0,
+ OCI_DEFAULT);
+ while (wait_timelimit(con, status));
+ if (done_timelimit(con, status)) goto stop_load;
+--
+1.7.10.4
+
diff --git a/opensips-0008-Fix-SQL-types.patch b/opensips-0008-Fix-SQL-types.patch
new file mode 100644
index 0000000..1e394c9
--- /dev/null
+++ b/opensips-0008-Fix-SQL-types.patch
@@ -0,0 +1,58 @@
+From abf48e295a266b4a987c4f5283114bd80019a202 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A1=D0=B0=D0=BC=D1?=
+ =?UTF-8?q?=83=D1=81=D0=B5=D0=BD=D0=BA=D0=BE?= <samusenko at msm.ru>
+Date: Thu, 14 Jun 2012 11:55:35 +0400
+Subject: [PATCH 08/13] Fix SQL types
+
+---
+ modules/db_oracle/val.c | 34 +++++++++++++++++++++++++++++++---
+ 1 file changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/modules/db_oracle/val.c b/modules/db_oracle/val.c
+index 85c0de7..80f4016 100644
+--- a/modules/db_oracle/val.c
++++ b/modules/db_oracle/val.c
+@@ -58,9 +58,37 @@ int db_oracle_val2bind(bmap_t* _m, const db_val_t* _v, OCIDate* _o)
+ if (VAL_NULL(_v)) {
+ _m->addr = NULL;
+ _m->size = 0;
+- _m->type = SQLT_NON;
+- return 0;
+- }
++ switch(VAL_TYPE(_v)) {
++ case DB_INT:
++ _m->type = SQLT_INT;
++ break;
++ case DB_BIGINT:
++ _m->type = SQLT_NUM;
++ break;
++ case DB_BITMAP:
++ _m->type = SQLT_UIN;
++ break;
++ case DB_DOUBLE:
++ _m->type = SQLT_FLT;
++ break;
++ case DB_STRING:
++ _m->type = SQLT_STR;
++ break;
++ case DB_STR:
++ _m->type = SQLT_CHR;
++ break;
++ case DB_DATETIME:
++ _m->type = SQLT_ODT;
++ break;
++ case DB_BLOB:
++ _m->type = SQLT_CLOB;
++ break;
++ default:
++ LM_ERR("unknown data type\n");
++ return -1;
++ }
++ return 0;
++ }
+
+ switch (VAL_TYPE(_v)) {
+ case DB_INT:
+--
+1.7.10.4
+
diff --git a/opensips-0009-Reset-column-types-to-NULL-upon-freeing-resultset-co.patch b/opensips-0009-Reset-column-types-to-NULL-upon-freeing-resultset-co.patch
new file mode 100644
index 0000000..1136977
--- /dev/null
+++ b/opensips-0009-Reset-column-types-to-NULL-upon-freeing-resultset-co.patch
@@ -0,0 +1,25 @@
+From f45b4ec621335dd1cbd36983cd16bb2c246f29cd Mon Sep 17 00:00:00 2001
+From: vladut-paiu <vladut-paiu at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Tue, 3 Jul 2012 09:34:52 +0000
+Subject: [PATCH 09/13] Reset column types to NULL upon freeing resultset
+ columns Credit to Peter Lemenkov
+
+---
+ db/db_res.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/db/db_res.c b/db/db_res.c
+index 78868ec..cbba30f 100644
+--- a/db/db_res.c
++++ b/db/db_res.c
+@@ -77,6 +77,7 @@ int db_free_columns(db_res_t* _r)
+ /* free names and types */
+ if (RES_NAMES(_r)) {
+ LM_DBG("freeing result columns at %p\n", RES_NAMES(_r));
++ RES_TYPES(_r) = NULL;
+ pkg_free(RES_NAMES(_r));
+ RES_NAMES(_r) = NULL;
+ }
+--
+1.7.10.4
+
diff --git a/opensips-0010-fixed-DB-type-inconsistency.patch b/opensips-0010-fixed-DB-type-inconsistency.patch
new file mode 100644
index 0000000..eae9fd9
--- /dev/null
+++ b/opensips-0010-fixed-DB-type-inconsistency.patch
@@ -0,0 +1,30 @@
+From d4f6843c5669ff24460981619338699fba1fb22c Mon Sep 17 00:00:00 2001
+From: vladut-paiu <vladut-paiu at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Tue, 3 Jul 2012 10:01:52 +0000
+Subject: [PATCH 10/13] fixed DB type inconsistency Credits to Peter Lemenkov
+
+---
+ modules/usrloc/ucontact.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
+index 17992d5..ea400d2 100644
+--- a/modules/usrloc/ucontact.c
++++ b/modules/usrloc/ucontact.c
+@@ -605,11 +605,11 @@ int db_update_ucontact(ucontact_t* _c)
+ vals2[2].nul = 0;
+ vals2[2].val.int_val = _c->cseq;
+
+- vals2[3].type = DB_INT;
++ vals2[3].type = DB_BITMAP;
+ vals2[3].nul = 0;
+ vals2[3].val.bitmap_val = _c->flags;
+
+- vals2[4].type = DB_INT;
++ vals2[4].type = DB_BITMAP;
+ vals2[4].nul = 0;
+ vals2[4].val.bitmap_val = _c->cflags;
+
+--
+1.7.10.4
+
diff --git a/opensips-0011-Proper-memory-zeroing.patch b/opensips-0011-Proper-memory-zeroing.patch
new file mode 100644
index 0000000..7b19e33
--- /dev/null
+++ b/opensips-0011-Proper-memory-zeroing.patch
@@ -0,0 +1,27 @@
+From aa98879132476af97f43eb3ea6b65b1305ebe283 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A1=D0=B0=D0=BC=D1?=
+ =?UTF-8?q?=83=D1=81=D0=B5=D0=BD=D0=BA=D0=BE?= <samusenko at msm.ru>
+Date: Thu, 14 Jun 2012 11:51:25 +0400
+Subject: [PATCH 11/13] Proper memory zeroing
+
+---
+ modules/db_oracle/res.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/modules/db_oracle/res.c b/modules/db_oracle/res.c
+index 1a0f9fe..e9e6233 100644
+--- a/modules/db_oracle/res.c
++++ b/modules/db_oracle/res.c
+@@ -87,7 +87,8 @@ static int get_columns(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
+ LM_ERR("could not allocate columns\n");
+ return -4;
+ }
+- memset(RES_NAMES(_r), 0, sizeof(db_key_t) * n);
++ for (i = 0; i < n; ++i)
++ memset(RES_NAMES(_r)[i], 0, sizeof(db_key_t));
+
+ RES_COL_N(_r) = n;
+
+--
+1.7.10.4
+
diff --git a/opensips-0012-Free-columns-data-only-in-Oracle.patch b/opensips-0012-Free-columns-data-only-in-Oracle.patch
new file mode 100644
index 0000000..1a784a4
--- /dev/null
+++ b/opensips-0012-Free-columns-data-only-in-Oracle.patch
@@ -0,0 +1,35 @@
+From 6ee02b3d27f241dc8ea262ae4233a9e6ef18a0cd Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Fri, 29 Jun 2012 14:10:32 +0400
+Subject: [PATCH 12/13] Free columns data only in Oracle
+
+---
+ modules/db_oracle/dbase.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/modules/db_oracle/dbase.c b/modules/db_oracle/dbase.c
+index 4dcc757..d129e11 100644
+--- a/modules/db_oracle/dbase.c
++++ b/modules/db_oracle/dbase.c
+@@ -182,11 +182,18 @@ void db_oracle_close(db_con_t* _h)
+ */
+ int db_oracle_free_result(db_con_t* _h, db_res_t* _r)
+ {
++ ub4 i;
++
+ if (!_h || !_r) {
+ LM_ERR("invalid parameter value\n");
+ return -1;
+ }
+
++ if (RES_NAMES(_r))
++ for (i=0; i < RES_COL_N(_r); ++i)
++ if (RES_NAMES(_r)[i]->s)
++ pkg_free(RES_NAMES(_r)[i]->s);
++
+ if (db_free_result(_r) < 0)
+ {
+ LM_ERR("failed to free result structure\n");
+--
+1.7.10.4
+
diff --git a/opensips-0013-Removed-all-async-Oracle-operations-they-didn-t-work.patch b/opensips-0013-Removed-all-async-Oracle-operations-they-didn-t-work.patch
new file mode 100644
index 0000000..890fd5a
--- /dev/null
+++ b/opensips-0013-Removed-all-async-Oracle-operations-they-didn-t-work.patch
@@ -0,0 +1,610 @@
+From ae9ec4f6793f7278d00d2b93eb671480a4cac40c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A1=D0=B0=D0=BC=D1?=
+ =?UTF-8?q?=83=D1=81=D0=B5=D0=BD=D0=BA=D0=BE?= <samusenko at msm.ru>
+Date: Mon, 25 Jun 2012 17:54:27 +0400
+Subject: [PATCH 13/13] Removed all async Oracle operations - they didn't work
+ well anyway
+
+---
+ modules/db_oracle/asynch.c | 270 -----------------------------------------
+ modules/db_oracle/asynch.h | 62 ----------
+ modules/db_oracle/db_oracle.c | 2 +-
+ modules/db_oracle/dbase.c | 53 +++-----
+ modules/db_oracle/ora_con.c | 73 ++++-------
+ modules/db_oracle/ora_con.h | 3 +-
+ modules/db_oracle/res.c | 110 +++++++++--------
+ modules/db_oracle/timer.c | 131 ++++++++++++++++++++
+ modules/db_oracle/timer.h | 22 ++++
+ 9 files changed, 256 insertions(+), 470 deletions(-)
+ delete mode 100644 modules/db_oracle/asynch.c
+ delete mode 100644 modules/db_oracle/asynch.h
+ create mode 100644 modules/db_oracle/timer.c
+ create mode 100644 modules/db_oracle/timer.h
+
+diff --git a/modules/db_oracle/db_oracle.c b/modules/db_oracle/db_oracle.c
+index 70cfe40..40c7692 100644
+--- a/modules/db_oracle/db_oracle.c
++++ b/modules/db_oracle/db_oracle.c
+@@ -31,7 +31,7 @@
+ #include "../../sr_module.h"
+ #include "../../db/db.h"
+ #include "dbase.h"
+-#include "asynch.h"
++#include "timer.h"
+
+ static int oracle_mod_init(void);
+ static void destroy(void);
+diff --git a/modules/db_oracle/dbase.c b/modules/db_oracle/dbase.c
+index d129e11..be2352e 100644
+--- a/modules/db_oracle/dbase.c
++++ b/modules/db_oracle/dbase.c
+@@ -36,7 +36,7 @@
+ #include "val.h"
+ #include "ora_con.h"
+ #include "res.h"
+-#include "asynch.h"
++#include "timer.h"
+ #include "dbase.h"
+
+
+@@ -212,7 +212,6 @@ static int db_oracle_submit_query(const db_con_t* _h, const str* _s)
+ OCIDate odt[sizeof(bind)/sizeof(bind[0])];
+ str tmps;
+ sword status;
+- int pass;
+ ora_con_t* con = CON_ORA(_h);
+ query_data_t* pqd = con->pqdata;
+ size_t hc = pqd->_n + pqd->_nw;
+@@ -223,32 +222,16 @@ static int db_oracle_submit_query(const db_con_t* _h, const str* _s)
+ (unsigned)hc);
+ return -1;
+ }
+-
+- if (!pqd->_rs) {
+- /*
+- * This method is at ~25% faster as set OCI_COMMIT_ON_SUCCESS
+- * in StmtExecute
+- */
+- tmps.len = snprintf(st_buf, sizeof(st_buf),
+- "begin %.*s; commit write batch nowait; end;",
+- _s->len, _s->s);
+- if ((unsigned)tmps.len >= sizeof(st_buf))
+- return sql_buf_small();
+- tmps.s = st_buf;
+- _s = &tmps;
+- }
+
+- pass = 1;
+- if (!con->connected) {
++ if (con->connected != 2) {
+ status = db_oracle_reconnect(con);
+ if (status != OCI_SUCCESS) {
+ LM_ERR("can't restore connection: %s\n", db_oracle_error(con, status));
+ return -2;
+ }
+ LM_INFO("connection restored\n");
+- --pass;
+ }
+-repeat:
++
+ stmthp = NULL;
+ status = OCIHandleAlloc(con->envhp, (dvoid**)(dvoid*)&stmthp,
+ OCI_HTYPE_STMT, 0, NULL);
+@@ -291,14 +274,10 @@ bind_err:
+ }
+ }
+
+- // timelimited operation
+- status = begin_timelimit(con, 0);
+- if (status != OCI_SUCCESS) goto ora_err;
+- do status = OCIStmtExecute(con->svchp, stmthp, con->errhp,
+- !pqd->_rs, 0, NULL, NULL,
+- pqd->_rs ? OCI_STMT_SCROLLABLE_READONLY : OCI_DEFAULT);
+- while (wait_timelimit(con, status));
+- if (done_timelimit(con, status)) goto stop_exec;
++ request_timer();
++ status = OCIStmtExecute(con->svchp, stmthp, con->errhp,
++ !pqd->_rs, 0, NULL, NULL, pqd->_rs ? OCI_DEFAULT : OCI_COMMIT_ON_SUCCESS);
++ timer_stop();
+ switch (status) {
+ case OCI_SUCCESS_WITH_INFO:
+ LM_WARN("driver: %s\n", db_oracle_errorinfo(con));
+@@ -310,8 +289,8 @@ bind_err:
+ OCIHandleFree(stmthp, OCI_HTYPE_STMT);
+ return 0;
+ default:
+- pass = -pass;
+- break;
++ LM_ERR("timeout/not connected to oracle\n");
++ break;
+ }
+
+ ora_err:
+@@ -319,15 +298,13 @@ ora_err:
+ stop_exec:
+ if (stmthp)
+ OCIHandleFree(stmthp, OCI_HTYPE_STMT);
+- if (pass == -1 && !con->connected) {
+- /* Attemtp to reconnect */
+- if (db_oracle_reconnect(con) == OCI_SUCCESS) {
+- LM_NOTICE("attempt repeat after reconnect\n");
+- pass = 0;
+- goto repeat;
+- }
++ LM_INFO("reconnecting to oracle...\n");
++ /* Attempt to reconnect */
++ if (db_oracle_reconnect(con) == OCI_SUCCESS)
++ LM_INFO("connection restored\n");
++ else
+ LM_ERR("connection loss\n");
+- }
++
+ return -4;
+ }
+
+diff --git a/modules/db_oracle/ora_con.c b/modules/db_oracle/ora_con.c
+index 73ced27..f03f753 100644
+--- a/modules/db_oracle/ora_con.c
++++ b/modules/db_oracle/ora_con.c
+@@ -22,9 +22,10 @@
+
+ #include <string.h>
+ #include <stdio.h>
++#include <errno.h>
+ #include "../../mem/mem.h"
+ #include "../../dprint.h"
+-#include "asynch.h"
++#include "timer.h"
+ #include "ora_con.h"
+
+ /*************************************************************************/
+@@ -105,6 +106,12 @@ bad_param:
+ status = OCIAttrSet(con->svchp, OCI_HTYPE_SVCCTX, con->authp, 0,
+ OCI_ATTR_SESSION, con->errhp);
+ if (status != OCI_SUCCESS) goto connect_err;
++
++ if (init_ora_timer(con) != 0) {
++ LM_ERR("can't start oracle timer thread\n");
++ goto drop_connection;
++ }
++
+ status = db_oracle_reconnect(con);
+ if (status != OCI_SUCCESS) {
+ connect_err:
+@@ -122,12 +129,11 @@ drop_connection:
+ }
+
+ // timelimited operation
+- status = begin_timelimit(con, 0);
+- if (status != OCI_SUCCESS) goto connect_err;
+- do status = OCIServerVersion(con->svchp, con->errhp, (OraText*)buf,
++ request_timer();
++ status = OCIServerVersion(con->svchp, con->errhp, (OraText*)buf,
+ (ub4)sizeof(buf), OCI_HTYPE_SVCCTX);
+- while (wait_timelimit(con, status));
+- if (done_timelimit(con, status)) goto drop_connection;
++ timer_stop();
++
+ if (status != OCI_SUCCESS) goto connect_err;
+ LM_INFO("server version is %s\n", buf);
+ return con;
+@@ -139,6 +145,7 @@ drop_connection:
+ */
+ void db_oracle_free_connection(ora_con_t* con)
+ {
++ destroy_ora_timer(con);
+ if (!con) return;
+
+ if (con->connected)
+@@ -164,20 +171,17 @@ void db_oracle_free_connection(ora_con_t* con)
+ void db_oracle_disconnect(ora_con_t* con)
+ {
+ sword status;
+-
+- switch (con->connected) {
+- default:
+- status = OCISessionEnd(con->svchp, con->errhp, con->authp,
+- OCI_DEFAULT);
+- if (status != OCI_SUCCESS)
+- LM_ERR("driver: %s\n", db_oracle_error(con, status));
+- case 1:
++ if (con->connected > 0) {
++ if (con->connected > 1) {
++ status = OCISessionEnd(con->svchp, con->errhp, con->authp,
++ OCI_DEFAULT);
++ if (status != OCI_SUCCESS)
++ LM_ERR("driver: %s\n", db_oracle_error(con, status));
++ }
+ status = OCIServerDetach(con->srvhp, con->errhp, OCI_DEFAULT);
+ if (status != OCI_SUCCESS)
+ LM_ERR("driver: %s\n", db_oracle_error(con, status));
+ con->connected = 0;
+- case 0:
+- break;
+ }
+ }
+
+@@ -192,48 +196,19 @@ sword db_oracle_reconnect(ora_con_t* con)
+ if (con->connected)
+ db_oracle_disconnect(con);
+
+- /* timelimited operation, but OCI tcp-network does not support it :( */
++ restore_timer();
+ status = OCIServerAttach(con->srvhp, con->errhp, (OraText*)con->uri,
+ con->uri_len, 0);
++ timer_stop();
+ if (status == OCI_SUCCESS) {
+ ++con->connected;
+- /*
+- * timelimited operation, but OCI has BUG in asynch
+- * implementation of OCISessionBegin :(.
+- *
+- * Next code is 'empiric hack' that work (tested) in v10/v11.
+- */
+- status = begin_timelimit(con, 1);
+- if (status != OCI_SUCCESS) goto done;
++ request_timer();
+ status = OCISessionBegin(con->svchp, con->errhp, con->authp,
+ OCI_CRED_RDBMS, OCI_DEFAULT);
+- while (wait_timelimit(con, status)) {
+- sword code;
+-
+- status = OCIServerVersion(con->svchp, con->errhp, NULL,
+- 0, OCI_HTYPE_SVCCTX);
+-
+- if ( status != OCI_ERROR
+- || OCIErrorGet(con->errhp, 1, NULL, &code, NULL, 0,
+- OCI_HTYPE_ERROR) != OCI_SUCCESS) break;
+- switch (code) {
+- case 24909: /* other call in progress */
+- status = OCI_STILL_EXECUTING;
+- continue;
+-
+- case 3127: /* no new operation until active ends */
+- status = OCISessionBegin(con->svchp, con->errhp,
+- con->authp, OCI_CRED_RDBMS, OCI_DEFAULT);
+- default:
+- break;
+- }
+- break;
+- }
+- if (done_timelimit(con, status)) goto done;
++ timer_stop();
+
+ if (status == OCI_SUCCESS)
+ ++con->connected;
+ }
+-done:
+ return status;
+ }
+diff --git a/modules/db_oracle/ora_con.h b/modules/db_oracle/ora_con.h
+index 5835ffe..7267bee 100644
+--- a/modules/db_oracle/ora_con.h
++++ b/modules/db_oracle/ora_con.h
+@@ -50,7 +50,8 @@ struct ora_con {
+
+ int connected; /* Authorized session started */
+ int bindpos; /* Last Bind handle position */
+-
++ pthread_t timer;
++
+ query_data_t* pqdata; /* Temporary: cb data for submit_query/store_result */
+
+ int uri_len;
+diff --git a/modules/db_oracle/res.c b/modules/db_oracle/res.c
+index e9e6233..2c625f8 100644
+--- a/modules/db_oracle/res.c
++++ b/modules/db_oracle/res.c
+@@ -32,7 +32,7 @@
+ #include "../../dprint.h"
+ #include "ora_con.h"
+ #include "dbase.h"
+-#include "asynch.h"
++#include "timer.h"
+ #include "res.h"
+
+
+@@ -54,6 +54,10 @@ struct dmap {
+ };
+ typedef struct dmap dmap_t;
+
++typedef struct ora_row {
++ struct db_row hdr;
++ struct ora_row* next;
++} ora_row_t;
+
+ /*
+ * Get and convert columns from a result. Define handlers and buffers
+@@ -362,66 +366,74 @@ static int convert_row(db_res_t* _res, db_row_t* _r, dmap_t* _d)
+ */
+ static int get_rows(ora_con_t* con, db_res_t* _r, OCIStmt* _c, dmap_t* _d)
+ {
+- ub4 rcnt;
++ ub4 i = 0, rcnt = 0;
+ sword status;
+ unsigned n = RES_COL_N(_r);
+-
++ // Since OCI have not "mysql_num_rows()", sequentialy fetch all rows into tmp area orow_list.
++ // Then call db_allocate_rows() and copy tmp to db module.
++ ora_row_t *orow_list = NULL, *orow_it, *orow_tail;
++
+ memcpy(_d->len, _d->ilen, sizeof(_d->len[0]) * n);
+-
+- // timelimited operation
+- status = begin_timelimit(con, 0);
+- if (status != OCI_SUCCESS) goto ora_err;
+- do status = OCIStmtFetch2(_c, con->errhp, 1, OCI_FETCH_NEXT, 0,
+- OCI_DEFAULT);
+- while (wait_timelimit(con, status));
+- if (done_timelimit(con, status)) goto stop_load;
+- if (status != OCI_SUCCESS) {
+- if (status != OCI_NO_DATA)
+- goto ora_err;
+-
+- RES_ROW_N(_r) = 0;
+- RES_ROWS(_r) = NULL;
+- return 0;
+- }
+-
+- status = OCIAttrGet(_c, OCI_HTYPE_STMT, &rcnt, NULL,
+- OCI_ATTR_CURRENT_POSITION, con->errhp);
+- if (status != OCI_SUCCESS) goto ora_err;
+- if (!rcnt) {
+- LM_ERR("lastpos==0\n");
+- goto stop_load;
++
++ request_timer();
++ while ((status = OCIStmtFetch2(_c, con->errhp, 1, OCI_FETCH_NEXT, 0,
++ OCI_DEFAULT)) == OCI_SUCCESS) {
++ timer_stop();
++
++ orow_it = (ora_row_t*) pkg_malloc(sizeof(ora_row_t) + sizeof(db_val_t)*RES_COL_N(_r));
++ if (orow_it == NULL) {
++ LM_ERR("no private memory left\n");
++ goto stop_load;
++ }
++ memset(orow_it, 0, sizeof(ora_row_t) + sizeof(db_val_t)*RES_COL_N(_r));
++ orow_it->hdr.values = (db_val_t*)(orow_it+1);
++
++ if (orow_list == NULL)
++ orow_list = orow_it;
++ else
++ orow_tail->next = orow_it;
++ orow_tail = orow_it;
++
++ if (convert_row(_r, &orow_it->hdr, _d) < 0) {
++ LM_ERR("erroc convert row\n");
++ goto stop_load;
++ }
++ memcpy(_d->len, _d->ilen, sizeof(_d->len[0]) * n);
++ ++rcnt;
++ request_timer();
+ }
+-
++ timer_stop();
++ if (status != OCI_NO_DATA)
++ goto ora_err;
++
+ RES_ROW_N(_r) = rcnt;
+ if (db_allocate_rows( _r, rcnt)!=0) {
+ LM_ERR("no private memory left\n");
+- return -1;
++ goto stop_load;
+ }
+-
+- while ( 1 ) {
+- if (convert_row(_r, &RES_ROWS(_r)[--rcnt], _d) < 0) {
+- LM_ERR("error convert row\n");
+- goto stop_load;
+- }
+-
+- if (!rcnt)
+- return 0;
+-
+- memcpy(_d->len, _d->ilen, sizeof(_d->len[0]) * n);
+- // timelimited operation
+- status = begin_timelimit(con, 0);
+- if (status != OCI_SUCCESS) goto ora_err;
+- do status = OCIStmtFetch2(_c, con->errhp, 1, OCI_FETCH_PRIOR, 0,
+- OCI_DEFAULT);
+- while (wait_timelimit(con, status));
+- if (done_timelimit(con, status)) goto stop_load;
+- if (status != OCI_SUCCESS) break;
++
++ for (orow_it = orow_list; orow_it; orow_it = orow_it->next) {
++ memcpy(ROW_VALUES(&RES_ROWS(_r)[i]), ROW_VALUES(&orow_it->hdr), sizeof(db_val_t)*RES_COL_N(_r));
++ ROW_N(&RES_ROWS(_r)[i]) = ROW_N(&orow_it->hdr);
++ ++i;
++ }
++
++ for (orow_it = orow_list; orow_it; orow_it = orow_list) {
++ orow_list = orow_it->next;
++ pkg_free(orow_it);
++ orow_it = NULL;
+ }
++ return 0;
++
+ ora_err:
+ LM_ERR("driver: %s\n", db_oracle_error(con, status));
+ stop_load:
+- db_free_rows(_r);
+- RES_ROW_N(_r) = 0; /* TODO: skipped in db_res.c :) */
++ for (orow_it = orow_list; orow_it; orow_it = orow_list) {
++ orow_list = orow_it->next;
++ db_free_row(&orow_it->hdr);
++ pkg_free(orow_it);
++ orow_it = NULL;
++ }
+ return -3;
+ }
+
+diff --git a/modules/db_oracle/timer.c b/modules/db_oracle/timer.c
+new file mode 100644
+index 0000000..50484f4
+--- /dev/null
++++ b/modules/db_oracle/timer.c
+@@ -0,0 +1,131 @@
++#include "timer.h"
++#include "../../dprint.h"
++#include "../../sr_module.h"
++
++#include <signal.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <sys/time.h>
++
++#define MAX_TIMEOUT_S 10
++#define MIN_TIMEOUT_MCS 100000
++
++/* Default is 3.0 second */
++struct itimerval request_tm = {{0,0}, {3,0}};
++// unsigned request_tm;
++
++/* Default is 0.2 second */
++struct itimerval restore_tm = {{0,0}, {0,200000}};
++
++struct itimerval stop_tm = {{0,0}, {0,0}};
++
++/* Simple error handling functions */
++
++#define handle_error_en(en, msg) \
++ do { LM_ERR(msg": %s\n", strerror(en)); return 1; } while (0)
++
++static ora_con_t *g_con;
++
++static int set_tv(unsigned type, const char* val, struct timeval* tv)
++{
++ char *eptr;
++ struct itimerval tt;
++ unsigned long s, ms;
++ double dv;
++
++ if (type != STR_PARAM) {
++ LM_ERR("type of parameter is no STR\n");
++ return -1;
++ }
++
++ if (!val || !*val) {
++ LM_ERR("empty parameter\n");
++ return -1;
++ }
++
++ errno = 0;
++ dv = strtod(val, &eptr);
++
++ if (*eptr) {
++ LM_ERR("invalid parameter string\n");
++ return -2;
++ }
++
++ if ( errno
++ || dv > (double)MAX_TIMEOUT_S
++ || (dv < ((double)MIN_TIMEOUT_MCS)/100000))
++ {
++ LM_ERR("value must be between 0.%.6u and %u.0\n",
++ MIN_TIMEOUT_MCS, MAX_TIMEOUT_S);
++ return -3;
++ }
++
++ s = (unsigned)dv;
++ dv -= (double)s;
++ ms = (unsigned)(dv * 1000000);
++ tv->tv_sec = (time_t)s;
++ tv->tv_usec = (suseconds_t)ms;
++ return 0;
++}
++
++
++/*
++ * set operation timeout
++ */
++int set_timeout(unsigned type, const char* val)
++{
++ return set_tv(type, val, &request_tm.it_value);
++}
++
++
++/*
++ * set (re)connect timeout
++ */
++int set_reconnect(unsigned type, const char* val)
++{
++ return set_tv(type, val, &restore_tm.it_value);
++}
++
++void ora_alarm_handle(int sig) {
++ LM_INFO("ora_alarm_handle\n");
++ sword status;
++ status = OCIBreak(g_con->svchp, g_con->errhp);
++ if (status != OCI_SUCCESS) {
++ LM_ERR("OCIBreak: %s\n", db_oracle_error(g_con, status));
++ }
++}
++
++int init_ora_timer(ora_con_t* con) {
++ g_con = con;
++ struct sigaction sa;
++ memset(&sa, 0, sizeof(sa));
++ sa.sa_handler = ora_alarm_handle;
++ if (sigaction(SIGALRM, &sa, NULL) < -1)
++ handle_error_en(errno, "sigaction");
++
++ return 0;
++}
++
++int destroy_ora_timer()
++{
++ timer_stop();
++}
++
++void request_timer()
++{
++ if (setitimer(ITIMER_REAL, &request_tm, NULL) < 0)
++ LM_ERR("setitimer: %s\n", strerror(errno));
++}
++
++void restore_timer()
++{
++ if (setitimer(ITIMER_REAL, &restore_tm, NULL) < 0)
++ LM_ERR("setitimer: %s\n", strerror(errno));
++}
++
++void timer_stop()
++{
++ if (setitimer(ITIMER_REAL, &stop_tm, NULL) < 0)
++ LM_ERR("setitimer: %s\n", strerror(errno));
++}
++
+\ No newline at end of file
+diff --git a/modules/db_oracle/timer.h b/modules/db_oracle/timer.h
+new file mode 100644
+index 0000000..24aa4a9
+--- /dev/null
++++ b/modules/db_oracle/timer.h
+@@ -0,0 +1,22 @@
++#ifndef ORA_TIMER_H
++#define ORA_TIMER_H
++
++#include "ora_con.h"
++
++/*
++ * parse timeout value for operation in syntax: nnn.mmm (sec/ms)
++ */
++int set_timeout(unsigned type, const char* val);
++
++/*
++ * parse timeout value for reconnect in syntax: nnn.mmm (sec/ms)
++ */
++int set_reconnect(unsigned type, const char* val);
++
++int init_ora_timer(ora_con_t* con);
++int destroy_ora_timer();
++
++void request_timer();
++void restore_timer();
++void timer_stop();
++#endif // ORA_TIMER_H
+\ No newline at end of file
+--
+1.7.10.4
+
diff --git a/opensips.spec b/opensips.spec
index 470eae7..95e63ef 100644
--- a/opensips.spec
+++ b/opensips.spec
@@ -13,29 +13,35 @@
%endif
%endif
-%global EXCLUDE_MODULES mi_xmlrpc osp json %{?disable_snmpstats} %{!?_with_oracle:db_oracle} %{?rhel:memcached}
+%global EXCLUDE_MODULES mi_xmlrpc osp json cachedb_cassandra %{?disable_snmpstats} %{!?_with_oracle:db_oracle} %{?rhel:cachedb_memcached} %{?rhel:cachedb_redis} lua
Summary: Open Source SIP Server
Name: opensips
-Version: 1.7.2
-Release: 8%{?dist}
+Version: 1.8.0
+Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Daemons
-Source0: http://opensips.org/pub/%{name}/%{version}/src/%{name}-%{version}_src.tar.gz
-Source1: %{name}.sysconfig
-Source2: %{name}.service
-Source3: %{name}.tmpfiles.conf
-# Applied upstream - available in 1.8.0+
-Patch1: opensips-0001-Check-for-stale-nonce-in-pre_auth.patch
-# Applied upstream - available in 1.8.0+
-Patch2: opensips-0002-Permit-unknown-options-to-be-passed-to-rtpproxy.patch
+Source0: http://opensips.org/pub/%{name}/%{version}/src/%{name}-%{version}-beta_src.tar.gz
+Patch1: opensips-0001-packaging-fedora-Improve-packaging-for-Fedora-RHEL-a.patch
+Patch2: opensips-0002-backport-from-trunk-rev-9099.patch
+Patch3: opensips-0003-Backported-from-trunk-rev-9121.patch
+Patch4: opensips-0004-db_oracle-typo-fixes.patch
+Patch5: opensips-0005-Drop-rpath-from-Oracle-s-module.patch
+Patch6: opensips-0006-Clean-Makefile-for-Oracle.patch
+Patch7: opensips-0007-Don-t-fetch-the-last-record-use-next-one.patch
+Patch8: opensips-0008-Fix-SQL-types.patch
+Patch9: opensips-0009-Reset-column-types-to-NULL-upon-freeing-resultset-co.patch
+Patch10: opensips-0010-fixed-DB-type-inconsistency.patch
+Patch11: opensips-0011-Proper-memory-zeroing.patch
+Patch12: opensips-0012-Free-columns-data-only-in-Oracle.patch
+Patch13: opensips-0013-Removed-all-async-Oracle-operations-they-didn-t-work.patch
URL: http://opensips.org
BuildRequires: expat-devel
BuildRequires: libxml2-devel
BuildRequires: bison
BuildRequires: flex
-#BuildRequires: subversion
+BuildRequires: subversion
# needed by snmpstats
BuildRequires: radiusclient-ng-devel
BuildRequires: mysql-devel
@@ -64,6 +70,9 @@ BuildRequires: python-devel
%if 0%{?fedora} > 16
BuildRequires: systemd-units
%endif
+BuildRequires: libxslt
+BuildRequires: lynx
+BuildRequires: ncurses-devel
#Initscripts
%if 0%{?fedora} > 16
@@ -184,6 +193,17 @@ Requires: %{name} = %{version}-%{release}
This is a module which provides a UNIX/UDP SOCKET transport layer
implementation for the Event Interface.
+%package event_rabbitmq
+Summary: Event RabbitMQ module
+Group: System Environment/Daemons
+Requires: %{name} = %{version}-%{release}
+BuildRequires: librabbitmq-devel
+
+%description event_rabbitmq
+This module provides the implementation of a RabbitMQ client for the Event Interface.
+It is used to send AMQP messages to a RabbitMQ server each time the Event Interface
+triggers an event subscribed for.
+
%package h350
Summary: H350 implementation
Group: System Environment/Daemons
@@ -194,6 +214,15 @@ The OpenSIPS H350 module enables an OpenSIPS SIP proxy server to access SIP
account data stored in an LDAP [RFC4510] directory containing H.350 [H.350]
commObjects.
+%package httpd
+Summary: HTTP transport layer implementation
+Group: System Environment/Daemons
+Requires: %{name} = %{version}-%{release}
+BuildRequires: libmicrohttpd-devel
+
+%description httpd
+This module provides an HTTP transport layer for OpenSIPS.
+
%package jabber
Summary: Gateway between OpenSIPS and a jabber server
Group: System Environment/Daemons
@@ -210,6 +239,18 @@ Requires: %{name} = %{version}-%{release}
%description ldap
The LDAP module implements an LDAP search interface for OpenSIPS.
+#%package lua
+#Summary: Helps implement your own OpenSIPS extensions in Lua
+#Group: System Environment/Daemons
+#Requires: %{name} = %{version}-%{release}
+#BuildRequires: lua-devel
+
+#%description lua
+#The time needed when writing a new OpenSIPS module unfortunately is quite
+#high, while the options provided by the configuration file are limited to
+#the features implemented in the modules. With this Lua module, you can
+#easily implement your own OpenSIPS extensions in Lua.
+
%if %{undefined rhel}
%package memcached
Summary: Memcached connector
@@ -456,6 +497,18 @@ Requires: %{name} = %{version}-%{release}
%description python
Helps implement your own OpenSIPS extensions in Python
+%if %{undefined rhel}
+%package redis
+Summary: Redis connector
+Group: System Environment/Daemons
+Requires: %{name} = %{version}-%{release}
+BuildRequires: hiredis-devel
+
+%description redis
+This module is an implementation of a cache system designed to work
+with a Redis server.
+%endif
+
%package regex
Summary: RegExp via PCRE library
Group: System Environment/Daemons
@@ -559,12 +612,25 @@ the exchange of instant messages between SIP clients and XMPP(jabber)
clients.
%prep
-%setup -q -n %{name}-%{version}-tls
-%patch1 -p1 -b .nonce
-%patch2 -p1 -b .permit_unknown
+%setup -q -n %{name}-%{version}-beta-tls
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+# Fix for broken behaviour of a git/rpmbuild in EL5
+rm -f modules/db_oracle/asynch.*
+%patch13 -p1
%build
-LOCALBASE=/usr CFLAGS="%{optflags}" %{?_with_oracle:ORAHOME="$ORACLE_HOME"} %{__make} all %{?_smp_mflags} TLS=1 \
+LOCALBASE=/usr NICER=0 CFLAGS="%{optflags}" %{?_with_oracle:ORAHOME="$ORACLE_HOME"} %{__make} all %{?_smp_mflags} TLS=1 \
exclude_modules="%EXCLUDE_MODULES" \
cfg-target=%{_sysconfdir}/opensips/ \
modules-prefix=%{buildroot}/%{_prefix} \
@@ -605,19 +671,17 @@ done
%if 0%{?fedora} > 16
# install systemd files
-install -D -m 0644 -p %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
-install -D -m 0644 -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf
+install -D -m 0644 -p packaging/fedora/%{name}.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
+install -D -m 0644 -p packaging/fedora/%{name}.tmpfiles.conf $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
%else
-mkdir -p $RPM_BUILD_ROOT%{_initrddir}
-%{__install} -p -D -m 755 packaging/fedora/opensips.init \
- $RPM_BUILD_ROOT%{_initrddir}/opensips
+install -p -D -m 755 packaging/fedora/opensips.init $RPM_BUILD_ROOT%{_initrddir}/opensips
%endif
echo -e "\nETCDIR=\"%{_sysconfdir}/opensips\"\n" \
>> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/opensipsctlrc
#install sysconfig file
-install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+install -D -p -m 644 packaging/fedora/%{name}.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -627,7 +691,7 @@ rm -rf $RPM_BUILD_ROOT
%if 0%{?fedora} > 16
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
-useradd -r -g %{name} -d %{_localstatedir}/run/opensips -s /sbin/nologin \
+useradd -r -g %{name} -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
-c "OpenSIPS SIP Server" %{name} 2>/dev/null || :
%endif
@@ -638,44 +702,44 @@ if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%else
-/sbin/chkconfig --add opensips
+/sbin/chkconfig --add %{name}
%endif
%preun
%if 0%{?fedora} > 16
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
- /bin/systemctl --no-reload disable couchdb.service > /dev/null 2>&1 || :
- /bin/systemctl stop couchdb.service > /dev/null 2>&1 || :
+ /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
+ /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
fi
%else
if [ $1 = 0 ]; then
- /sbin/service opensips stop > /dev/null 2>&1
- /sbin/chkconfig --del opensips
+ /sbin/service %{name} stop > /dev/null 2>&1
+ /sbin/chkconfig --del %{name}
fi
%endif
%if 0%{?fedora} > 16
-%triggerun -- opensips < 1.7.2-1
+%triggerun -- %{name} < 1.7.2-1
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply opensips
# to migrate them to systemd targets
-/usr/bin/systemd-sysv-convert --save opensips >/dev/null 2>&1 ||:
+/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
-/sbin/chkconfig --del opensips >/dev/null 2>&1 || :
-/bin/systemctl try-restart openips.service >/dev/null 2>&1 || :
+/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
+/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
%triggerun -- opensips < 1.7.2-4
-chown -R opensips:opensips %{_sysconfdir}/opensips
+chown -R %{opensips_user}:%{opensips_group} %{_sysconfdir}/%{name}
%endif
%files
-%defattr(-,root,root,-)
%{_sbindir}/opensips
%{_sbindir}/opensipsctl
%{_sbindir}/opensipsdbctl
%{_sbindir}/opensipsunix
+%{_sbindir}/osipsconfig
%{_sbindir}/osipsconsole
%attr(750,%{opensips_user},%{opensips_group}) %dir %{_sysconfdir}/opensips
@@ -702,7 +766,7 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%attr(640,%{opensips_user},%{opensips_group}) %config(noreplace) %{_sysconfdir}/opensips/opensips.cfg
%attr(640,%{opensips_user},%{opensips_group}) %config(noreplace) %{_sysconfdir}/opensips/opensipsctlrc
%attr(640,%{opensips_user},%{opensips_group}) %config(noreplace) %{_sysconfdir}/opensips/osipsconsolerc
-# these files are just an example so no need to restrict access to them
+# these files are just an examples so no need to restrict access to them
%config(noreplace) %{_sysconfdir}/opensips/tls/ca.conf
%config(noreplace) %{_sysconfdir}/opensips/tls/request.conf
%config(noreplace) %{_sysconfdir}/opensips/tls/rootCA/cacert.pem
@@ -727,10 +791,13 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%{_libdir}/opensips/opensipsctl/opensipsdbctl.dbtext
%{_libdir}/opensips/opensipsctl/dbtextdb/dbtextdb.py*
-%dir %{_datadir}/opensips
-%dir %{_datadir}/opensips/dbtext
-%dir %{_datadir}/opensips/dbtext/opensips
+%dir %{_datadir}/opensips/
+%dir %{_datadir}/opensips/dbtext/
+%dir %{_datadir}/opensips/dbtext/opensips/
+%dir %{_datadir}/opensips/menuconfig_templates/
+
%{_datadir}/opensips/dbtext/opensips/*
+%{_datadir}/opensips/menuconfig_templates/*.m4
%{_mandir}/man5/opensips.cfg.5*
%{_mandir}/man8/opensips.8*
@@ -750,12 +817,14 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%{_libdir}/opensips/modules/auth_db.so
%{_libdir}/opensips/modules/avpops.so
%{_libdir}/opensips/modules/benchmark.so
+%{_libdir}/opensips/modules/cachedb_local.so
%{_libdir}/opensips/modules/call_control.so
%{_libdir}/opensips/modules/closeddial.so
%{_libdir}/opensips/modules/cfgutils.so
%{_libdir}/opensips/modules/db_flatstore.so
%{_libdir}/opensips/modules/db_virtual.so
%{_libdir}/opensips/modules/db_text.so
+%{_libdir}/opensips/modules/dns_cache.so
%{_libdir}/opensips/modules/dialog.so
%{_libdir}/opensips/modules/dialplan.so
%{_libdir}/opensips/modules/dispatcher.so
@@ -770,12 +839,12 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%{_libdir}/opensips/modules/identity.so
%{_libdir}/opensips/modules/imc.so
%{_libdir}/opensips/modules/load_balancer.so
-%{_libdir}/opensips/modules/localcache.so
%{_libdir}/opensips/modules/mangler.so
%{_libdir}/opensips/modules/maxfwd.so
%{_libdir}/opensips/modules/mediaproxy.so
%{_libdir}/opensips/modules/mi_fifo.so
%{_libdir}/opensips/modules/mi_datagram.so
+%{_libdir}/opensips/modules/mi_http.so
%{_libdir}/opensips/modules/msilo.so
%{_libdir}/opensips/modules/nathelper.so
%{_libdir}/opensips/modules/nat_traversal.so
@@ -790,6 +859,8 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%{_libdir}/opensips/modules/registrar.so
%{_libdir}/opensips/modules/rr.so
%{_libdir}/opensips/modules/signaling.so
+%{_libdir}/opensips/modules/sipcapture.so
+%{_libdir}/opensips/modules/sipmsgops.so
%{_libdir}/opensips/modules/siptrace.so
%{_libdir}/opensips/modules/sl.so
%{_libdir}/opensips/modules/speeddial.so
@@ -812,12 +883,14 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.auth_db
%doc docdir/README.avpops
%doc docdir/README.benchmark
+%doc docdir/README.cachedb_local
%doc docdir/README.call_control
%doc docdir/README.closeddial
%doc docdir/README.cfgutils
%doc docdir/README.db_flatstore
%doc docdir/README.db_virtual
%doc docdir/README.db_text
+%doc docdir/README.dns_cache
%doc docdir/README.dialog
%doc docdir/README.dialplan
%doc docdir/README.dispatcher
@@ -832,12 +905,12 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.identity
%doc docdir/README.imc
%doc docdir/README.load_balancer
-%doc docdir/README.localcache
%doc docdir/README.mangler
%doc docdir/README.maxfwd
%doc docdir/README.mediaproxy
%doc docdir/README.mi_fifo
%doc docdir/README.mi_datagram
+%doc docdir/README.mi_http
%doc docdir/README.msilo
%doc docdir/README.nathelper
%doc docdir/README.nat_traversal
@@ -852,6 +925,8 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.registrar
%doc docdir/README.rr
%doc docdir/README.signaling
+%doc docdir/README.sipcapture
+%doc docdir/README.sipmsgops
%doc docdir/README.siptrace
%doc docdir/README.sl
%doc docdir/README.speeddial
@@ -869,44 +944,36 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.uac_registrant
%files aaa_radius
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/aaa_radius.so
%doc docdir/README.aaa_radius
%files acc
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/acc.so
%doc docdir/README.acc
%files auth_aaa
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/auth_aaa.so
%doc docdir/README.auth_aaa
%files auth_diameter
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/auth_diameter.so
%doc docdir/README.auth_diameter
%files b2bua
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/b2b_entities.so
%{_libdir}/opensips/modules/b2b_logic.so
%doc docdir/README.b2b_entities
%doc docdir/README.b2b_logic
%files carrierroute
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/carrierroute.so
%doc docdir/README.carrierroute
%files cpl-c
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/cpl-c.so
%doc docdir/README.cpl-c
%files db_berkeley
-%defattr(-,root,root,-)
%{_sbindir}/bdb_recover
%{_libdir}/opensips/modules/db_berkeley.so
%{_libdir}/opensips/opensipsctl/opensipsctl.db_berkeley
@@ -917,44 +984,49 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.db_berkeley
%files db_http
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/db_http.so
%doc docdir/README.db_http
%files event_datagram
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/event_datagram.so
%doc docdir/README.event_datagram
+%files event_rabbitmq
+%{_libdir}/opensips/modules/event_rabbitmq.so
+%doc docdir/README.event_rabbitmq
+
%files h350
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/h350.so
%doc docdir/README.h350
+%files httpd
+%{_libdir}/opensips/modules/httpd.so
+%doc docdir/README.httpd
+
%files jabber
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/jabber.so
%doc docdir/README.jabber
%files ldap
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/ldap.so
%doc docdir/README.ldap
+#%files lua
+#%defattr(-,root,root,-)
+#%{_libdir}/opensips/modules/lua.so
+#%doc docdir/README.lua
+
%if %{undefined rhel}
%files memcached
-%defattr(-,root,root,-)
-%{_libdir}/opensips/modules/memcached.so
-%doc docdir/README.memcached
+%{_libdir}/opensips/modules/cachedb_memcached.so
+%doc docdir/README.cachedb_memcached
%endif
%files mmgeoip
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/mmgeoip.so
%doc docdir/README.mmgeoip
%files mysql
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/db_mysql.so
%{_libdir}/opensips/opensipsctl/opensipsctl.mysql
%{_libdir}/opensips/opensipsctl/opensipsdbctl.mysql
@@ -964,7 +1036,6 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%if 0%{?_with_oracle}
%files oracle
-%defattr(-,root,root,-)
%{_sbindir}/opensips_orasel
%{_libdir}/opensips/modules/db_oracle.so
%{_libdir}/opensips/opensipsctl/opensipsctl.oracle
@@ -976,12 +1047,10 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%endif
%files peering
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/peering.so
%doc docdir/README.peering
%files perl
-%defattr(-,root,root,-)
%dir %{perl_vendorlib}/OpenSIPS
%dir %{perl_vendorlib}/OpenSIPS/LDAPUtils
%dir %{perl_vendorlib}/OpenSIPS/Utils
@@ -996,7 +1065,6 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.perl
%files perlvdb
-%defattr(-,root,root,-)
%dir %{perl_vendorlib}/OpenSIPS/VDB
%dir %{perl_vendorlib}/OpenSIPS/VDB/Adapter
%{_libdir}/opensips/modules/perlvdb.so
@@ -1016,7 +1084,6 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.perlvdb
%files postgresql
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/db_postgres.so
%{_libdir}/opensips/opensipsctl/opensipsctl.pgsql
%{_libdir}/opensips/opensipsctl/opensipsdbctl.pgsql
@@ -1025,91 +1092,79 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%doc docdir/README.db_postgres
%files presence
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/presence.so
%doc docdir/README.presence
%files presence_callinfo
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/presence_callinfo.so
%doc docdir/README.presence_callinfo
%files presence_dialoginfo
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/presence_dialoginfo.so
%doc docdir/README.presence_dialoginfo
%files presence_mwi
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/presence_mwi.so
%doc docdir/README.presence_mwi
%files presence_xcapdiff
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/presence_xcapdiff.so
%files presence_xml
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/presence_xml.so
%doc docdir/README.presence_xml
%files pua
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/pua.so
%doc docdir/README.pua
%files pua_bla
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/pua_bla.so
%doc docdir/README.pua_bla
%files pua_dialoginfo
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/pua_dialoginfo.so
%doc docdir/README.pua_dialoginfo
%files pua_mi
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/pua_mi.so
%doc docdir/README.pua_mi
%files pua_usrloc
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/pua_usrloc.so
%doc docdir/README.pua_usrloc
%files pua_xmpp
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/pua_xmpp.so
%doc docdir/README.pua_xmpp
%files python
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/python.so
+%if %{undefined rhel}
+%files redis
+%{_libdir}/opensips/modules/cachedb_redis.so
+%doc docdir/README.cachedb_redis
+%endif
+
%files regex
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/regex.so
%doc docdir/README.regex
%files rls
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/rls.so
%doc docdir/README.rls
%files seas
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/seas.so
%doc docdir/README.seas
%files sms
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/sms.so
%doc docdir/README.sms
%if %{undefined disable_snmpstats}
%files snmpstats
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/snmpstats.so
%doc docdir/README.snmpstats
%dir %{_datadir}/snmp
@@ -1122,26 +1177,25 @@ chown -R opensips:opensips %{_sysconfdir}/opensips
%endif
%files tlsops
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/tlsops.so
%doc docdir/README.tlsops
%files unixodbc
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/db_unixodbc.so
%doc docdir/README.db_unixodbc
%files xcap_client
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/xcap_client.so
%doc docdir/README.xcap_client
%files xmpp
-%defattr(-,root,root,-)
%{_libdir}/opensips/modules/xmpp.so
%doc docdir/README.xmpp
%changelog
+* Tue Jul 03 2012 Peter Lemenkov <lemenkov at gmail.com> - 1.8.0-1
+- update to 1.8.0
+
* Fri Jun 08 2012 Petr Pisar <ppisar at redhat.com> - 1.7.2-8
- Perl 5.16 rebuild
diff --git a/sources b/sources
index fdfd35b..21989c1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2ff1a5ba832491267fc5f3e1ae21b666 opensips-1.7.2_src.tar.gz
+21a1bb74d8b8ed5adbaa0d3bf1084b48 opensips-1.8.0-beta_src.tar.gz
More information about the scm-commits
mailing list