[hamradio-commits] [dump1090] 370/373: add pthreads to copyright and hack around EAGAIN in anetWrite() to let jQuery come across
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Thu Oct 23 14:58:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch backport
in repository dump1090.
commit 0e280de4deb021eca63355ed66a174547922cca4
Author: Matthew Ernisse <mernisse at ub3rgeek.net>
Date: Tue Oct 21 20:03:10 2014 -0400
add pthreads to copyright and hack around EAGAIN in anetWrite() to let jQuery come across
---
debian/changelog | 4 +++-
debian/control | 4 ++--
debian/copyright | 24 ++++++++++++++++++++++++
debian/patches/02-http-buffer.patch | 34 ++++++++++++++++++++++++++++------
4 files changed, 57 insertions(+), 9 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e1d90da..0dde8b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
dump1090 (1.09.1007.14+dfsg-3) unstable; urgency=low
* Replace shipped version of excanvas.js with libjs-excanvas
+ * Modify the internal HTTP server to allow JavaScript libraries to be
+ served from dump1090 (have anetWrite() in anet.c handle EAGAIN).
- -- Matthew Ernisse <mernisse at ub3rgeek.net> Sun, 19 Oct 2014 15:01:42 -0400
+ -- Matthew Ernisse <mernisse at ub3rgeek.net> Tue, 21 Oct 2014 19:59:00 -0400
dump1090 (1.09.1007.14+dfsg-2) unstable; urgency=low
diff --git a/debian/control b/debian/control
index 6254e70..9b0cb80 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,8 @@ Uploaders: Matthew Ernisse <mernisse at ub3rgeek.net>
Build-Depends: debhelper (>= 9), librtlsdr-dev, libusb-1.0-0-dev, pkg-config
Standards-Version: 3.9.6
Homepage: https://github.com/MalcolmRobb/dump1090
-Vcs-Git: https://github.com/mernisse/dump1090.git
-Vcs-Browser: https://github.com/mernisse/dump1090
+Vcs-Git: http://anonscm.debian.org/git/pkg-hamradio/dump1090.git
+Vcs-Browser: http://anonscm.debian.org/cgit/pkg-hamradio/dump1090.git
Package: dump1090
Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 77dca90..06c1d20 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -31,6 +31,11 @@ Files: ppup1090.*
Copyright: 2013 Malcolm Robb <Support at ATTAvionics.com>
License: BSD-2-clause
+Files: pthreads/*
+Copyright: 1998 John E. Bossom
+ 1999, 2005 Pthreads-win32 contributors <rpj at callisto.canberra.edu.au>
+License: LGPL-2.0
+
Files: rtl-sdr/rtl-sdr_export.c
Copyright: 2012 Hoernchen <la at tfc-server.de>
License: GPL-2.0
@@ -113,3 +118,22 @@ License: GPL-2.0
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+License: LGPL-2.0
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library in the file COPYING.LIB;
+ if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ .
+ On Debian systems, the complete text of the GNU Lesser General
+ Public License version 2 can be found in "/usr/share/common-licenses/LGPL-2".
diff --git a/debian/patches/02-http-buffer.patch b/debian/patches/02-http-buffer.patch
index 26d4f5e..023938f 100644
--- a/debian/patches/02-http-buffer.patch
+++ b/debian/patches/02-http-buffer.patch
@@ -5,7 +5,15 @@ Forwarded: no
--- a/net_io.c
+++ b/net_io.c
-@@ -686,6 +686,8 @@
+@@ -91,6 +91,7 @@
+ services[j].port, services[j].descr, Modes.aneterr);
+ exit(1);
+ }
++
+ anetNonBlock(Modes.aneterr, s);
+ *services[j].socket = s;
+ } else {
+@@ -686,6 +687,8 @@
//
//=========================================================================
//
@@ -14,7 +22,7 @@ Forwarded: no
#define MODES_CONTENT_TYPE_HTML "text/html;charset=utf-8"
#define MODES_CONTENT_TYPE_CSS "text/css;charset=utf-8"
#define MODES_CONTENT_TYPE_JSON "application/json;charset=utf-8"
-@@ -701,6 +703,7 @@
+@@ -701,6 +704,7 @@
int handleHTTPRequest(struct client *c, char *p) {
char hdr[512];
int clen, hdrlen;
@@ -22,7 +30,7 @@ Forwarded: no
int httpver, keepalive;
char *url, *content;
char ctype[48];
-@@ -752,13 +755,17 @@
+@@ -752,13 +756,17 @@
if (stat(getFile, &sbuf) != -1 && (fd = open(getFile, O_RDONLY)) != -1) {
content = (char *) malloc(sbuf.st_size);
if (read(fd, content, sbuf.st_size) == -1) {
@@ -42,7 +50,7 @@ Forwarded: no
}
if (fd != -1) {
-@@ -782,7 +789,7 @@
+@@ -782,7 +790,7 @@
// Create the header and send the reply
hdrlen = snprintf(hdr, sizeof(hdr),
@@ -51,7 +59,7 @@ Forwarded: no
"Server: Dump1090\r\n"
"Content-Type: %s\r\n"
"Connection: %s\r\n"
-@@ -790,6 +797,7 @@
+@@ -790,6 +798,7 @@
"Cache-Control: no-cache, must-revalidate\r\n"
"Expires: Sat, 26 Jul 1997 05:00:00 GMT\r\n"
"\r\n",
@@ -59,7 +67,7 @@ Forwarded: no
ctype,
keepalive ? "keep-alive" : "close",
clen);
-@@ -800,15 +808,24 @@
+@@ -800,15 +809,24 @@
// Send header and content.
#ifndef _WIN32
@@ -87,3 +95,17 @@ Forwarded: no
free(content);
Modes.stat_http_requests++;
return !keepalive;
+--- a/anet.c
++++ b/anet.c
+@@ -228,7 +228,10 @@
+ while(totlen != count) {
+ nwritten = write(fd,buf,count-totlen);
+ if (nwritten == 0) return totlen;
+- if (nwritten == -1) return -1;
++ if (nwritten == -1 && errno != EAGAIN) {
++ return -1;
++ continue;
++ }
+ totlen += nwritten;
+ buf += nwritten;
+ }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git
More information about the pkg-hamradio-commits
mailing list