[arch-commits] Commit in trickle/repos (6 files)
Balló György
bgyorgy at nymeria.archlinux.org
Wed Dec 25 09:36:34 UTC 2013
Date: Wednesday, December 25, 2013 @ 10:36:34
Author: bgyorgy
Revision: 102975
archrelease: copy trunk to community-i686, community-x86_64
Added:
trickle/repos/community-i686/PKGBUILD
(from rev 102974, trickle/trunk/PKGBUILD)
trickle/repos/community-i686/fix-crasher.patch
(from rev 102974, trickle/trunk/fix-crasher.patch)
trickle/repos/community-x86_64/PKGBUILD
(from rev 102974, trickle/trunk/PKGBUILD)
trickle/repos/community-x86_64/fix-crasher.patch
(from rev 102974, trickle/trunk/fix-crasher.patch)
Deleted:
trickle/repos/community-i686/PKGBUILD
trickle/repos/community-x86_64/PKGBUILD
------------------------------------+
/PKGBUILD | 84 ++++++++++++++++++++++++++++++++++
community-i686/PKGBUILD | 33 -------------
community-i686/fix-crasher.patch | 86 +++++++++++++++++++++++++++++++++++
community-x86_64/PKGBUILD | 33 -------------
community-x86_64/fix-crasher.patch | 86 +++++++++++++++++++++++++++++++++++
5 files changed, 256 insertions(+), 66 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2013-12-25 09:36:26 UTC (rev 102974)
+++ community-i686/PKGBUILD 2013-12-25 09:36:34 UTC (rev 102975)
@@ -1,33 +0,0 @@
-# $Id$
-# Maintainer: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
-# Contributor Romain Bouchaud-Leduc <r0m1.bl at camaris.org>
-
-pkgname=trickle
-pkgver=1.07
-pkgrel=7
-pkgdesc="Lightweight userspace bandwidth shaper"
-arch=('i686' 'x86_64')
-url="http://monkey.org/~marius/trickle"
-license=('BSD')
-depends=('libevent')
-source=("http://monkey.org/~marius/trickle/${pkgname}-${pkgver}.tar.gz")
-md5sums=('860ebc4abbbd82957c20a28bd9390d7d')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # FS#23194
- sed -i 's|^_select(int|select(int|' trickle-overload.c
-
- ./configure --prefix=/usr \
- --mandir=/usr/share/man
- sed -i "s|.*in_addr_t.*||g" config.h
- make -j1
-}
-
-package(){
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- make DESTDIR="${pkgdir}" install
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
Copied: trickle/repos/community-i686/PKGBUILD (from rev 102974, trickle/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2013-12-25 09:36:34 UTC (rev 102975)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
+# Contributor Romain Bouchaud-Leduc <r0m1.bl at camaris.org>
+
+pkgname=trickle
+pkgver=1.07
+pkgrel=8
+pkgdesc="Lightweight userspace bandwidth shaper"
+arch=('i686' 'x86_64')
+url="http://monkey.org/~marius/trickle"
+license=('BSD')
+depends=('libevent')
+source=("http://monkey.org/~marius/trickle/${pkgname}-${pkgver}.tar.gz"
+ "fix-crasher.patch")
+md5sums=('860ebc4abbbd82957c20a28bd9390d7d'
+ 'a072091bce131e9f7229bff85ed5858c')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # FS#27549
+ sed -i 's|^_select(int|select(int|' trickle-overload.c
+
+ # FS#35872
+ patch -Np1 -i "${srcdir}/fix-crasher.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ sed -i "s|.*in_addr_t.*||g" config.h
+ make -j1
+}
+
+package(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
Copied: trickle/repos/community-i686/fix-crasher.patch (from rev 102974, trickle/trunk/fix-crasher.patch)
===================================================================
--- community-i686/fix-crasher.patch (rev 0)
+++ community-i686/fix-crasher.patch 2013-12-25 09:36:34 UTC (rev 102975)
@@ -0,0 +1,86 @@
+diff --git a/trickle-overload.c b/trickle-overload.c
+index e72eb0c..9254e89 100644
+--- a/trickle-overload.c
++++ b/trickle-overload.c
+@@ -393,18 +393,14 @@ struct _pollfd {
+ }
+
+ static struct delay *
+-select_shift(struct delayhead *dhead, struct timeval *inittv,
++select_shift(struct delayhead *dhead, struct timeval *difftv,
+ struct timeval **delaytv)
+ {
+- struct timeval curtv, difftv;
+ struct delay *d;
+ struct sockdesc *sd;
+
+- gettimeofday(&curtv, NULL);
+- timersub(&curtv, inittv, &difftv);
+-
+ TAILQ_FOREACH(d, dhead, next) {
+- if (timercmp(&d->delaytv, &difftv, >))
++ if (timercmp(&d->delaytv, difftv, >))
+ break;
+ sd = d->sd;
+
+@@ -413,7 +409,7 @@ struct _pollfd {
+ }
+
+ if (d != NULL)
+- timersub(&d->delaytv, &difftv, *delaytv);
++ timersub(&d->delaytv, difftv, *delaytv);
+ else
+ *delaytv = NULL;
+
+@@ -431,8 +427,8 @@ struct _pollfd {
+ {
+ struct sockdesc *sd;
+ fd_set *fdsets[] = { wfds, rfds }, *fds;
+- struct timeval *delaytv, *selecttv = NULL, *timeout = NULL, _timeout,
+- inittv, curtv, difftv;
++ struct timeval *delaytv, _delaytv, *selecttv = NULL, *timeout = NULL,
++ _timeout, inittv, curtv, difftv;
+ short which;
+ struct delayhead dhead;
+ struct delay *d, *_d;
+@@ -462,15 +458,18 @@ struct _pollfd {
+ FD_ISSET(sd->sock, fds) &&
+ select_delay(&dhead, sd, which)) {
+ FD_CLR(sd->sock, fds);
+- nfds--;
+ }
+
+ gettimeofday(&inittv, NULL);
+ curtv = inittv;
+ d = TAILQ_FIRST(&dhead);
+- delaytv = d != NULL ? &d->delaytv : NULL;
++ if (d != NULL) {
++ _delaytv = d->delaytv;
++ delaytv = &_delaytv;
++ } else
++ delaytv = NULL;
++ timersub(&curtv, &inittv, &difftv);
+ again:
+- timersub(&inittv, &curtv, &difftv);
+ selecttv = NULL;
+
+ if (delaytv != NULL)
+@@ -498,15 +497,15 @@ struct _pollfd {
+ #endif /* DEBUG */
+
+ if (ret == 0 && delaytv != NULL && selecttv == delaytv) {
+- _d = select_shift(&dhead, &inittv, &delaytv);
++ gettimeofday(&curtv, NULL);
++ timersub(&curtv, &inittv, &difftv);
++ _d = select_shift(&dhead, &difftv, &delaytv);
+ while ((d = TAILQ_FIRST(&dhead)) != _d) {
+ FD_SET(d->sd->sock, fdsets[d->which]);
+- nfds++;
+ TAILQ_REMOVE(&dhead, d, next);
+ free(d);
+ }
+
+- gettimeofday(&curtv, NULL);
+ goto again;
+ }
+
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2013-12-25 09:36:26 UTC (rev 102974)
+++ community-x86_64/PKGBUILD 2013-12-25 09:36:34 UTC (rev 102975)
@@ -1,33 +0,0 @@
-# $Id$
-# Maintainer: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
-# Contributor Romain Bouchaud-Leduc <r0m1.bl at camaris.org>
-
-pkgname=trickle
-pkgver=1.07
-pkgrel=7
-pkgdesc="Lightweight userspace bandwidth shaper"
-arch=('i686' 'x86_64')
-url="http://monkey.org/~marius/trickle"
-license=('BSD')
-depends=('libevent')
-source=("http://monkey.org/~marius/trickle/${pkgname}-${pkgver}.tar.gz")
-md5sums=('860ebc4abbbd82957c20a28bd9390d7d')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # FS#23194
- sed -i 's|^_select(int|select(int|' trickle-overload.c
-
- ./configure --prefix=/usr \
- --mandir=/usr/share/man
- sed -i "s|.*in_addr_t.*||g" config.h
- make -j1
-}
-
-package(){
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- make DESTDIR="${pkgdir}" install
- install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
Copied: trickle/repos/community-x86_64/PKGBUILD (from rev 102974, trickle/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2013-12-25 09:36:34 UTC (rev 102975)
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Jaroslav Lichtblau <dragonlord at aur.archlinux.org>
+# Contributor Romain Bouchaud-Leduc <r0m1.bl at camaris.org>
+
+pkgname=trickle
+pkgver=1.07
+pkgrel=8
+pkgdesc="Lightweight userspace bandwidth shaper"
+arch=('i686' 'x86_64')
+url="http://monkey.org/~marius/trickle"
+license=('BSD')
+depends=('libevent')
+source=("http://monkey.org/~marius/trickle/${pkgname}-${pkgver}.tar.gz"
+ "fix-crasher.patch")
+md5sums=('860ebc4abbbd82957c20a28bd9390d7d'
+ 'a072091bce131e9f7229bff85ed5858c')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # FS#27549
+ sed -i 's|^_select(int|select(int|' trickle-overload.c
+
+ # FS#35872
+ patch -Np1 -i "${srcdir}/fix-crasher.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ sed -i "s|.*in_addr_t.*||g" config.h
+ make -j1
+}
+
+package(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
Copied: trickle/repos/community-x86_64/fix-crasher.patch (from rev 102974, trickle/trunk/fix-crasher.patch)
===================================================================
--- community-x86_64/fix-crasher.patch (rev 0)
+++ community-x86_64/fix-crasher.patch 2013-12-25 09:36:34 UTC (rev 102975)
@@ -0,0 +1,86 @@
+diff --git a/trickle-overload.c b/trickle-overload.c
+index e72eb0c..9254e89 100644
+--- a/trickle-overload.c
++++ b/trickle-overload.c
+@@ -393,18 +393,14 @@ struct _pollfd {
+ }
+
+ static struct delay *
+-select_shift(struct delayhead *dhead, struct timeval *inittv,
++select_shift(struct delayhead *dhead, struct timeval *difftv,
+ struct timeval **delaytv)
+ {
+- struct timeval curtv, difftv;
+ struct delay *d;
+ struct sockdesc *sd;
+
+- gettimeofday(&curtv, NULL);
+- timersub(&curtv, inittv, &difftv);
+-
+ TAILQ_FOREACH(d, dhead, next) {
+- if (timercmp(&d->delaytv, &difftv, >))
++ if (timercmp(&d->delaytv, difftv, >))
+ break;
+ sd = d->sd;
+
+@@ -413,7 +409,7 @@ struct _pollfd {
+ }
+
+ if (d != NULL)
+- timersub(&d->delaytv, &difftv, *delaytv);
++ timersub(&d->delaytv, difftv, *delaytv);
+ else
+ *delaytv = NULL;
+
+@@ -431,8 +427,8 @@ struct _pollfd {
+ {
+ struct sockdesc *sd;
+ fd_set *fdsets[] = { wfds, rfds }, *fds;
+- struct timeval *delaytv, *selecttv = NULL, *timeout = NULL, _timeout,
+- inittv, curtv, difftv;
++ struct timeval *delaytv, _delaytv, *selecttv = NULL, *timeout = NULL,
++ _timeout, inittv, curtv, difftv;
+ short which;
+ struct delayhead dhead;
+ struct delay *d, *_d;
+@@ -462,15 +458,18 @@ struct _pollfd {
+ FD_ISSET(sd->sock, fds) &&
+ select_delay(&dhead, sd, which)) {
+ FD_CLR(sd->sock, fds);
+- nfds--;
+ }
+
+ gettimeofday(&inittv, NULL);
+ curtv = inittv;
+ d = TAILQ_FIRST(&dhead);
+- delaytv = d != NULL ? &d->delaytv : NULL;
++ if (d != NULL) {
++ _delaytv = d->delaytv;
++ delaytv = &_delaytv;
++ } else
++ delaytv = NULL;
++ timersub(&curtv, &inittv, &difftv);
+ again:
+- timersub(&inittv, &curtv, &difftv);
+ selecttv = NULL;
+
+ if (delaytv != NULL)
+@@ -498,15 +497,15 @@ struct _pollfd {
+ #endif /* DEBUG */
+
+ if (ret == 0 && delaytv != NULL && selecttv == delaytv) {
+- _d = select_shift(&dhead, &inittv, &delaytv);
++ gettimeofday(&curtv, NULL);
++ timersub(&curtv, &inittv, &difftv);
++ _d = select_shift(&dhead, &difftv, &delaytv);
+ while ((d = TAILQ_FIRST(&dhead)) != _d) {
+ FD_SET(d->sd->sock, fdsets[d->which]);
+- nfds++;
+ TAILQ_REMOVE(&dhead, d, next);
+ free(d);
+ }
+
+- gettimeofday(&curtv, NULL);
+ goto again;
+ }
+
More information about the arch-commits
mailing list