aboutsummaryrefslogtreecommitdiffstats
path: root/main/kamailio
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2015-03-26 07:47:21 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2015-03-26 07:47:33 +0000
commit2c18bc2652f3ff862d60fbb8e6bb754e01715351 (patch)
tree0943b4bd2137a1f374034c6dd26e02a1cd4f592f /main/kamailio
parent881db4c64746f64e5b3ac69eedadbd33e2af350d (diff)
downloadaports-2c18bc2652f3ff862d60fbb8e6bb754e01715351.tar.bz2
aports-2c18bc2652f3ff862d60fbb8e6bb754e01715351.tar.xz
main/kamailio: properly order sorting of DNS records with srv_query
Diffstat (limited to 'main/kamailio')
-rw-r--r--main/kamailio/APKBUILD8
-rw-r--r--main/kamailio/kamailio-4.2-ipops-srv-query.patch21
2 files changed, 15 insertions, 14 deletions
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD
index 3cdfb5e4f8..35accf69b7 100644
--- a/main/kamailio/APKBUILD
+++ b/main/kamailio/APKBUILD
@@ -13,7 +13,7 @@ _gittag=HEAD
pkgver=4.2.3
-pkgrel=4
+pkgrel=5
[ -z "${_gitcommit}" ] && _suffix="_src" || _suffix="-${_gitcommit}"
pkgdesc="Open Source SIP Server"
@@ -494,7 +494,7 @@ redis() {
md5sums="f94eb1db3820dba22bd3fdae464e93b3 kamailio-4.2.3_src.tar.gz
bad1ac2d4c95043df271d2ea6d37627a kamailio-4.2-backslash.patch
4685288dc54680597b00f956dc95d4d6 0001-musl-fixes.patch
-5b7ecf5c4ae06420c028e03721cb9e89 kamailio-4.2-ipops-srv-query.patch
+e9c0ba8192a1a4f2a08a2e2add20e3d7 kamailio-4.2-ipops-srv-query.patch
7df723eb9e14df28adfff8643d99a1a9 DMQ-multi-notify.patch
841fa62c432c5d8aeb57ad70d2ec3030 default_ctl.patch
d0052e6054884b9cec955af4480c7c85 kamctl_build.patch
@@ -503,7 +503,7 @@ d0052e6054884b9cec955af4480c7c85 kamctl_build.patch
sha256sums="7dbbca4a515778d3e903380adcc49f727ddc4853238cb905e14c811a5671ed80 kamailio-4.2.3_src.tar.gz
d7e59be721ed0ad4621d404493b9a519708d801e9d4914b0164b819fa1abcd13 kamailio-4.2-backslash.patch
b98555ff304b51b82c6cf7e01d757b15ea4f05bd2e603c84d4384df6a6be62b6 0001-musl-fixes.patch
-cfe645fc80eaed8a9e4bd56047f75555b2a9e3edcb3e2b6c6cece1547ab0a574 kamailio-4.2-ipops-srv-query.patch
+7e33c95bdb942e4ed6d54e14476cad2ee7edfc256b1f250e5f133d9e8a9b2a67 kamailio-4.2-ipops-srv-query.patch
384eeaa5b253228341dc7a74ec61314db4b8f2f1c9c2f3bdf9ba189d2d56911d DMQ-multi-notify.patch
755efa4ad126c672bc67c53268260b57f7da1f454cdc1a1601778ed7c7d5f0e5 default_ctl.patch
e00eefed792acbc1ee6eca8fa7389f9973bd53b68fa7abc573f19f1ff26812a1 kamctl_build.patch
@@ -512,7 +512,7 @@ a90d3ab09a3ed58892e94710a1f80492a61ffad1ccf7ccb5b851bb8f538d32c4 kamailio.initd
sha512sums="2f42499fe84eefac236fe3d4aa3c7bc424944236f00b95a7071feaa816b3df5764f84076d57b2137908dab7ff06a2440cc7a53a799216befd9511f8718a2eee5 kamailio-4.2.3_src.tar.gz
a9bb1e8f9f373264b8351ddae099a36a46ddd46fdec09e468d297ba4f64bb4896e7d6e599da70a424e8a28695ab3f3b4ac940afab534593a6b9d08ae462f001a kamailio-4.2-backslash.patch
dea7ef2ccf01357576045ba375d41301e2447b4454324007c7ca1862322835c57045852017192ca5434b32dd1b7a2e9669209b7111889dab335b74f042d0f11f 0001-musl-fixes.patch
-3a9bb5d05b4628f6146b824b8916db259f1da51415398ba420900311d73986d21cab653079080c0e8c55ef512909f542279ca7da944b5ef14520331584ca958f kamailio-4.2-ipops-srv-query.patch
+b5c048b6e06de0c7514c14d0ec99bbe939eaa956d9d9d3dd5f48b1bcbcff06dbd6498d384427253fb655997a10ec5fa31dcc5cfd2f8cc5c64dcd531649133781 kamailio-4.2-ipops-srv-query.patch
7ddf6444c15f7338e7aab779ea5b75f4fd936b51cf5d9ba0d09e813566e527f74e59e100661d2b27db99e5fa042614c83e8145e999a8b6bfcfab71c9595bb626 DMQ-multi-notify.patch
2321d8afe29b53057ce21e0552dfb80fd6a0e7dc0caf3c4798a8b253518f4c8c546797302933373f4b055a4531329a36ee2d7117b0a88fe39cf153bfef91a656 default_ctl.patch
4c2c9bde3a4c44feca2863bb03cb031aa55e1c3df21dc7c0acb3a392c34cb36d9a132bcbdf451a0624f8ec202152f1cf238c89280c32f1c04312ce80427a18c6 kamctl_build.patch
diff --git a/main/kamailio/kamailio-4.2-ipops-srv-query.patch b/main/kamailio/kamailio-4.2-ipops-srv-query.patch
index 450215e112..cdae3e6280 100644
--- a/main/kamailio/kamailio-4.2-ipops-srv-query.patch
+++ b/main/kamailio/kamailio-4.2-ipops-srv-query.patch
@@ -1,3 +1,4 @@
+Only in b: ipops.patch
--- a/modules/ipops/ipops_mod.c
+++ b/modules/ipops/ipops_mod.c
@@ -21,6 +21,7 @@
@@ -98,7 +99,7 @@
struct _hn_pv_data {
str data;
str fullname;
-@@ -594,4 +592,545 @@
+@@ -594,4 +592,544 @@
return pv_get_null(msg, param, res);;
return pv_get_strval(msg, param, res, &_hn_data->hostname);
}
@@ -244,7 +245,7 @@
+void sort_weights (struct srv_rdata **plist, int pos1, int pos2)
+
+{
-+int idx1, idx2, idx3, lastfound;
++int idx1, idx2, lastfound;
+struct srv_rdata *wlist [PV_SRV_MAXRECS];
+unsigned int rand, sum, sums [PV_SRV_MAXRECS];
+
@@ -269,37 +270,36 @@
+**********/
+
+sum = 0;
-+for (idx1 = pos1; idx1 <= pos2; idx1++) {
++for (idx1 = 0; idx1 < idx2; idx1++) {
+ sum += wlist [idx1]->weight;
-+ sums [pos1 - idx1] = sum;
++ sums [idx1] = sum;
+}
+
+/**********
+* resort randomly
+**********/
+
-+idx3 = pos1;
+lastfound = 0;
-+for (idx1 = pos2 - pos1; idx1; --idx1) {
++for (idx1 = pos1; idx1 <= pos2; idx1++) {
+ /**********
+ * o calculate a random number in range
+ * o find first unsorted
+ **********/
+
+ rand = fastrand_max (sum);
-+ for (idx2 = 0; idx2 < pos2 - pos1; idx2++) {
++ for (idx2 = 0; idx2 <= pos2 - pos1; idx2++) {
+ if (!wlist [idx2]) {
+ continue;
+ }
+ if (sums [idx2] >= rand) {
-+ plist [idx3++] = wlist [idx2];
++ plist [idx1] = wlist [idx2];
+ wlist [idx2] = 0;
+ break;
+ }
+ lastfound = idx2;
+ }
-+ if (idx2 == pos2 - pos1) {
-+ plist [idx3++] = wlist [lastfound];
++ if (idx2 > pos2 - pos1) {
++ plist [idx1] = wlist [lastfound];
+ wlist [lastfound] = 0;
+ }
+}
@@ -656,3 +656,4 @@
+
#endif
+Only in b: modules/ipops/locate_sip_server.txt