diff options
author | Leonardo Arena <rnalrd@gmail.com> | 2011-01-24 07:03:53 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-01-31 13:56:58 +0000 |
commit | 404c10a42016c03c08f90c4ae8f80745d5c564f8 (patch) | |
tree | af17fcd778db449fae443235396ddb145485c337 | |
parent | 3f4b7c84dd1b82c853d4349fd7925a8996805679 (diff) | |
download | alpine_aports-404c10a42016c03c08f90c4ae8f80745d5c564f8.tar.bz2 alpine_aports-404c10a42016c03c08f90c4ae8f80745d5c564f8.tar.xz alpine_aports-404c10a42016c03c08f90c4ae8f80745d5c564f8.zip |
main/kamailio: fix #521
(cherry picked from commit f7f5b3cce7936c3aec52d50676a2521244380e70)
-rw-r--r-- | main/kamailio/APKBUILD | 6 | ||||
-rw-r--r-- | main/kamailio/kamailio-3.1-invalid_type_3_or_nul_0_version_columns_for_trusted.patch | 36 |
2 files changed, 40 insertions, 2 deletions
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD index 17ae634475..c3d0caf01e 100644 --- a/main/kamailio/APKBUILD +++ b/main/kamailio/APKBUILD | |||
@@ -2,7 +2,7 @@ | |||
2 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 2 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
3 | pkgname=kamailio | 3 | pkgname=kamailio |
4 | pkgver=3.1.1 | 4 | pkgver=3.1.1 |
5 | pkgrel=1 | 5 | pkgrel=2 |
6 | pkgdesc="Open Source SIP Server" | 6 | pkgdesc="Open Source SIP Server" |
7 | url="http://www.kamailio.org/" | 7 | url="http://www.kamailio.org/" |
8 | pkgusers="kamailio" | 8 | pkgusers="kamailio" |
@@ -19,6 +19,7 @@ source="http://www.kamailio.org/pub/kamailio/$pkgver/src/kamailio-${pkgver}_src. | |||
19 | kamailio.initd | 19 | kamailio.initd |
20 | kamailio-3.1-backslash.patch | 20 | kamailio-3.1-backslash.patch |
21 | sqlite.patch | 21 | sqlite.patch |
22 | kamailio-3.1-invalid_type_3_or_nul_0_version_columns_for_trusted.patch | ||
22 | " | 23 | " |
23 | 24 | ||
24 | _builddir="$srcdir"/$pkgname-$pkgver | 25 | _builddir="$srcdir"/$pkgname-$pkgver |
@@ -156,4 +157,5 @@ md5sums="f0bf80cfae676c086f827b499eaf21cd kamailio-3.1.1_src.tar.gz | |||
156 | a3c959ec568c43a905710e7d25cd8c25 kamailio.cfg | 157 | a3c959ec568c43a905710e7d25cd8c25 kamailio.cfg |
157 | 81100c479890a2a8c2628db22fdd1a0c kamailio.initd | 158 | 81100c479890a2a8c2628db22fdd1a0c kamailio.initd |
158 | 3cb2eaeed81e4cdb1830f06a88de19e7 kamailio-3.1-backslash.patch | 159 | 3cb2eaeed81e4cdb1830f06a88de19e7 kamailio-3.1-backslash.patch |
159 | 199df21eaa4856dcacdcc438f72765f1 sqlite.patch" | 160 | 199df21eaa4856dcacdcc438f72765f1 sqlite.patch |
161 | ec66753ab24a9a14ff315ac4b3d352cc kamailio-3.1-invalid_type_3_or_nul_0_version_columns_for_trusted.patch" | ||
diff --git a/main/kamailio/kamailio-3.1-invalid_type_3_or_nul_0_version_columns_for_trusted.patch b/main/kamailio/kamailio-3.1-invalid_type_3_or_nul_0_version_columns_for_trusted.patch new file mode 100644 index 0000000000..b11a3204a6 --- /dev/null +++ b/main/kamailio/kamailio-3.1-invalid_type_3_or_nul_0_version_columns_for_trusted.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | --- a/lib/srdb1/db_id.c | ||
2 | +++ b/lib/srdb1/db_id.c | ||
3 | @@ -241,6 +241,7 @@ | ||
4 | LM_ERR("error while parsing database URL: '%.*s' \n", url->len, url->s); | ||
5 | goto err; | ||
6 | } | ||
7 | + ptr->pid=getpid(); | ||
8 | |||
9 | return ptr; | ||
10 | |||
11 | @@ -260,6 +261,7 @@ | ||
12 | { | ||
13 | if (!id1 || !id2) return 0; | ||
14 | if (id1->port != id2->port) return 0; | ||
15 | + if (((int)id1->pid) != ((int)id2->pid)) return 0; | ||
16 | |||
17 | if (strcmp(id1->scheme, id2->scheme)) return 0; | ||
18 | if (id1->username!=0 && id2->username!=0) { | ||
19 | --- a/lib/srdb1/db_id.h | ||
20 | +++ b/lib/srdb1/db_id.h | ||
21 | @@ -31,6 +31,7 @@ | ||
22 | #define _DB1_ID_H | ||
23 | |||
24 | #include "../../str.h" | ||
25 | +#include <sys/types.h> | ||
26 | |||
27 | /** Structure representing a database ID */ | ||
28 | struct db_id { | ||
29 | @@ -40,6 +41,7 @@ | ||
30 | char* host; /**< Host or IP, case insensitive */ | ||
31 | unsigned short port; /**< Port number */ | ||
32 | char* database; /**< Database, case sensitive */ | ||
33 | + pid_t pid; /**< Process ID (only allow one database connection per thread */ | ||
34 | }; | ||
35 | |||
36 | |||