From MAILER-DAEMON Wed Aug 01 10:47:43 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwaD9-0001ji-S6
	for mharc-gpsd-dev@gnu.org; Wed, 01 Aug 2012 10:47:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48608)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <egil.moller@freecode.no>) id 1SwaD5-0001df-R0
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 10:47:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <egil.moller@freecode.no>) id 1SwaCx-0002JY-Kx
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 10:47:39 -0400
Received: from mail-lb0-f173.google.com ([209.85.217.173]:54286)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <egil.moller@freecode.no>) id 1SwaCx-0002JK-Do
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 10:47:31 -0400
Received: by lbok6 with SMTP id k6so395675lbo.4
	for <gpsd-dev@nongnu.org>; Wed, 01 Aug 2012 07:47:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:x-gm-message-state;
	bh=nMhqlIWdOH/sQHRTmHBL0FqzV2tKxvTo2gPKhBHxOCE=;
	b=LfGx87xUgxA5SFM302scYl92QBX5TsDxrKaLeSP6vJJkdCPNMX1LTszA1fdYHRw0Ds
	rhv5ZxxRrwhqaKGboDci+/ESFkOv4hxSf5OMFI32dT1V0e1Z27/TQiZ4zP1cXFHL5H/Y
	WFZUHCrhN8MQ7NBxeMD3KoYTnKh6rSLW/GxMYNvQTBw8Uogz49VSv0uepNWxx1Qt2fUr
	niUpCcEO9j3Vhw9Iz9SdPDtGtnGbab+PMK9aAGBG+LizfoggeAkO/8SprXl3O7C5oktF
	z8FbCdVEj+ez8KH2bphxhSxV8YVziRlHTYJA42INGx5mp6+sInHK9aX0Qdak6aNVGpBB
	8x7Q==
Received: by 10.152.110.70 with SMTP id hy6mr18303712lab.44.1343832449851;
	Wed, 01 Aug 2012 07:47:29 -0700 (PDT)
Received: from [192.168.1.237] (c83-248-130-230.bredband.comhem.se.
	[83.248.130.230])
	by mx.google.com with ESMTPS id mo3sm3149161lab.2.2012.08.01.07.47.28
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 01 Aug 2012 07:47:28 -0700 (PDT)
Message-ID: <5019417F.8030102@freecode.no>
Date: Wed, 01 Aug 2012 16:47:27 +0200
From: Egil <egil.moller@freecode.no>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: gpsd-users@nongnu.org, gpsd-dev@nongnu.org
References: <5015CCB7.3070404@freecode.no> <rmihaspjv3m.fsf@fnord.ir.bbn.com>
In-Reply-To: <rmihaspjv3m.fsf@fnord.ir.bbn.com>
X-Enigmail-Version: 1.4.2
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="------------enig09369F250FDDD07AA7F68E28"
X-Gm-Message-State: ALoCoQlAKQVnDlGpaBxzicTRyB4DPahkPaB3WsrEyEATh8cm1S/Ul7i186yPyMvC9CkvOaCrRjvO
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.217.173
Subject: Re: [gpsd-dev] [gpsd-users] Announcement: agpsd - a gpsd logging
 and replication daemon
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Aug 2012 14:47:42 -0000

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig09369F250FDDD07AA7F68E28
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I seem to have forgotten the most important information. I guess you can
all hear the big "ouuuuupsi" resonate all over the internet ;P

Anyway, here's the vital details I forgot:

License: GPL v3
Source code: http://redhog.github.com/agpsd

/Egil



--------------enig09369F250FDDD07AA7F68E28
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQGUF/AAoJELvEb9hu4GSLtWgH/372xyqq8olJlvwVjpiBi/XA
dRonfyGPbnTAPTEeAak4/ll5b0ecTEf4nmRtYuWExNi5h7PwS/EHyJ0bDoFAL9g6
hzB7vUX8I88wM9WZ2KuSi66CxOeVs2qfh1xfoAzcqnYr5FbKb4dslyNwIyeE8+3m
VUwrzsBzChPIKXVLBy/hlz2hxiSgxs8Jf9Yigz7BWzKj9J/QpIXBvl6p5ZYXvLnt
CjM+tlQX1My3AEqscWnYVfQ8Nm3OsVAFMr/HLfU+bvn3LeXEqnBKACuYgGWLG2Nz
ix/FfcUkrQrgOrgOamdEqnRePLA/i8MJD0kXtDPYe9RJa1UE+GZhT66MFB4NyPg=
=Mt45
-----END PGP SIGNATURE-----

--------------enig09369F250FDDD07AA7F68E28--


From MAILER-DAEMON Wed Aug 01 17:33:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwgXQ-0003LP-NY
	for mharc-gpsd-dev@gnu.org; Wed, 01 Aug 2012 17:33:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59683)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgXO-0003KR-AT
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:33:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgXL-0002wa-UH
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:33:02 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:43429)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgXL-0002wD-Oe
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:32:59 -0400
Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id A92C51B4009
	for <gpsd-dev@nongnu.org>; Wed,  1 Aug 2012 21:32:57 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
To: gpsd-dev@nongnu.org
Date: Wed,  1 Aug 2012 17:32:59 -0400
Message-Id: <1343856779-5961-1-git-send-email-vapier@gentoo.org>
X-Mailer: git-send-email 1.7.9.7
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Subject: [gpsd-dev] [PATCH] ignore new libQgpsmm.prl file
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Aug 2012 21:33:03 -0000

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 .gitignore |    1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 1577dea..ae6bf4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -128,4 +128,5 @@ www/pydoc
 # Controls for the flock tester
 devtools/.flocktest.ini
 # QT stuff
+libQgpsmm.prl
 libQgpsmm/binaries/*
-- 
1.7.9.7



From MAILER-DAEMON Wed Aug 01 17:33:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwgY6-0003Qw-Tx
	for mharc-gpsd-dev@gnu.org; Wed, 01 Aug 2012 17:33:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59818)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgY4-0003QN-Jd
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:33:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgY3-00031N-Jw
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:33:44 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:43530)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgY3-00031I-Ds
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:33:43 -0400
Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id A5C181B402A
	for <gpsd-dev@nongnu.org>; Wed,  1 Aug 2012 21:33:42 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
To: gpsd-dev@nongnu.org
Date: Wed,  1 Aug 2012 17:33:44 -0400
Message-Id: <1343856824-6013-1-git-send-email-vapier@gentoo.org>
X-Mailer: git-send-email 1.7.9.7
In-Reply-To: <1328825282-12873-1-git-send-email-vapier@gentoo.org>
References: <1328825282-12873-1-git-send-email-vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Subject: [gpsd-dev] [PATCH v2] always install the man pages
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Aug 2012 21:33:45 -0000

Since we maintain local copies, don't require xmlto/xsltproc in
order to install them.  This makes packaging simpler.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
	- if manbuilder is disabled, and the man page doesn't exist, then
	  don't try to install the man page

 SConstruct |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/SConstruct b/SConstruct
index 30db2ad..23d6f18 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1241,11 +1241,12 @@ if qt_env:
 
 
 maninstall = []
-if manbuilder:
-    for manpage in base_manpages.keys() + python_manpages.keys():
-        section = manpage.split(".")[1]
-        dest = os.path.join(installdir('mandir'), "man"+section, manpage)
-        maninstall.append(env.InstallAs(source=manpage, target=dest))
+for manpage in base_manpages.keys() + python_manpages.keys():
+    if not manbuilder and not os.path.exists(manpage):
+        continue
+    section = manpage.split(".")[1]
+    dest = os.path.join(installdir('mandir'), "man"+section, manpage)
+    maninstall.append(env.InstallAs(source=manpage, target=dest))
 install = env.Alias('install', binaryinstall + maninstall + python_install + pc_install + headerinstall)
 
 def Uninstall(nodes):
-- 
1.7.9.7



From MAILER-DAEMON Wed Aug 01 17:50:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SwgoT-0006m3-UK
	for mharc-gpsd-dev@gnu.org; Wed, 01 Aug 2012 17:50:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56140)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgoO-0006hH-DC
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:50:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgoJ-0007dK-SE
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:50:36 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:45141)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SwgoJ-0007dG-M9
	for gpsd-dev@nongnu.org; Wed, 01 Aug 2012 17:50:31 -0400
Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 4301867A1D;
	Wed,  1 Aug 2012 21:50:30 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
To: gpsd-dev@nongnu.org
Date: Wed,  1 Aug 2012 17:50:32 -0400
Message-Id: <1343857832-18980-1-git-send-email-vapier@gentoo.org>
X-Mailer: git-send-email 1.7.9.7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gentoo.org>
Subject: [gpsd-dev] [PATCH] handle multiple flags in a single variable
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Aug 2012 21:50:40 -0000

From: Diego Elio Petten=C3=B2 <flameeyes@gentoo.org>

If you build with:
	LINKFLAGS=3D'-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=3Dboth' scons
the current code fails because it parses these flags as a single argument
instead of a space-delimited list of flags.  Make sure we split this valu=
e
properly.
---
 SConstruct |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SConstruct b/SConstruct
index 23d6f18..434b47c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -237,7 +237,7 @@ for i in ["AR", "ARFLAGS", "CCFLAGS", "CFLAGS", "CC",=
 "CXX", "CXXFLAGS", "STRIP"
             env.Replace(**{j: os.getenv(i)})
 for flags in ["LDFLAGS", "LINKFLAGS", "SHLINKFLAGS", "CPPFLAGS"]:
     if os.environ.has_key(flags):
-        env.MergeFlags({flags : [os.getenv(flags)]})
+        env.MergeFlags({flags : Split(os.getenv(flags))})
=20
=20
 # Keep scan-build options in the environment
--=20
1.7.9.7



From MAILER-DAEMON Tue Aug 07 12:06:32 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SymIi-0003I5-8N
	for mharc-gpsd-dev@gnu.org; Tue, 07 Aug 2012 12:06:32 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35948)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <glutz@alk.com>) id 1SyRB1-0002w5-66
	for gpsd-dev@nongnu.org; Mon, 06 Aug 2012 13:33:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <glutz@alk.com>) id 1SyRAz-0002Ho-Js
	for gpsd-dev@nongnu.org; Mon, 06 Aug 2012 13:33:11 -0400
Received: from mail1.messaging.alk.com ([209.92.34.199]:52294)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <glutz@alk.com>) id 1SyRAz-0002Hi-FN
	for gpsd-dev@nongnu.org; Mon, 06 Aug 2012 13:33:09 -0400
X-Footer: YWxrLmNvbQ==
Received: from [74.8.125.2] ([74.8.125.2])
	by mail1.messaging.alk.com (Kerio Connect 7.4.1)
	for gpsd-dev@nongnu.org; Mon, 6 Aug 2012 13:13:00 -0400
Date: Mon, 6 Aug 2012 13:12:57 -0400
Importance: Normal
X-Priority: 3
X-MSMail-Priority: Normal
Thread-Index: Ac1z9rla96P7vuk0TfeLAZs1AWOWyA==
Message-ID: <6cd67420-ab30-4920-ba3b-7ef28a8b0931@alk.com>
X-Mailer: Kerio Outlook Connector (Offline Edition) (7.4.1.7267 T0)
From: George Lutz <glutz@alk.com>
Sender: George Lutz <glutz@alk.com>
To: gpsd-dev@nongnu.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=-4IAnPJufRkE5aqaswBxP"
X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+,
	tstamp-)
X-Received-From: 209.92.34.199
X-Mailman-Approved-At: Tue, 07 Aug 2012 12:06:30 -0400
Subject: [gpsd-dev] gpspipe timeout on select (fd==0)
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Aug 2012 17:33:13 -0000

--=-4IAnPJufRkE5aqaswBxP
Content-Type: text/plain; charset="us-ascii"

I can build and run the gpspipe example from the gpsd-3.7 library.  However, the select( ) on the gps fd always times out.  I assume it's because the fd returned from gps_open is always 0 (stdin), which is odd because gps_open( ) does succeed when I pass it localhost:<validport>.
 
In comparison, just running the gpspipe binary included in the gpsd library does work ok.  This happens on 2 ubuntu systems using gcc to compile.  I'm looking for ways to further debug this but if gps_open( ) is returning a bad fd, I'm not sure why that would be or how I can work with that.
 
Thanks for any help.
--=-4IAnPJufRkE5aqaswBxP
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span style=3D'c=
olor:#1F497D'>I can build and run the gpspipe example from the gpsd-3.7 lib=
rary.&nbsp; However, the select( ) on the gps fd always times out.&nbsp; I =
assume it&#8217;s because the fd returned from gps_open is always 0 (stdin)=
, which is odd because gps_open( ) does succeed when I pass it localhost:&l=
t;validport&gt;.<o:p></o:p></span></p><p class=3DMsoNormal><span style=3D'c=
olor:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span style=
=3D'color:#1F497D'>In comparison, just running the gpspipe binary included =
in the gpsd library does work ok. &nbsp;This happens on 2 ubuntu systems us=
ing gcc to compile.&nbsp; I&#8217;m looking for ways to further debug this =
but if gps_open( ) is returning a bad fd, I&#8217;m not sure why that would=
 be or how I can work with that.<o:p></o:p></span></p><p class=3DMsoNormal>=
<span style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNor=
mal><span style=3D'color:#1F497D'>Thanks for any help.<o:p></o:p></span></p=
><p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span=
></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></body></html>=

--=-4IAnPJufRkE5aqaswBxP--



From MAILER-DAEMON Tue Aug 07 13:57:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Syo1w-0004js-AE
	for mharc-gpsd-dev@gnu.org; Tue, 07 Aug 2012 13:57:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48708)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1Syo1t-0004hS-6x
	for gpsd-dev@nongnu.org; Tue, 07 Aug 2012 13:57:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1Syo1s-00022f-3O
	for gpsd-dev@nongnu.org; Tue, 07 Aug 2012 13:57:17 -0400
Received: from mail.recluse.de ([217.196.146.213]:34980)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd@bzed.de>) id 1Syo1r-00021r-TJ
	for gpsd-dev@nongnu.org; Tue, 07 Aug 2012 13:57:16 -0400
Received: from mail.recluse.de (localhost [127.0.0.1])
	by mail.recluse.de (Postfix) with ESMTP id 6A65928203;
	Tue,  7 Aug 2012 19:57:13 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at recluse.de
Received: from mail.recluse.de ([127.0.0.1])
	by mail.recluse.de (mail.recluse.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id NOllmvDoqLv6; Tue,  7 Aug 2012 19:57:11 +0200 (CEST)
Received: from think.bzed.org (188-192-189-117-dynip.superkabel.de
	[188.192.189.117])
	by mail.recluse.de (Postfix) with ESMTPSA id C0638281DF;
	Tue,  7 Aug 2012 19:57:11 +0200 (CEST)
Message-ID: <502156F7.6000705@bzed.de>
Date: Tue, 07 Aug 2012 19:57:11 +0200
From: Bernd Zeimetz <bernd@bzed.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:10.0.5) Gecko/20120624 Icedove/10.0.5
MIME-Version: 1.0
To: George Lutz <glutz@alk.com>
References: <6cd67420-ab30-4920-ba3b-7ef28a8b0931@alk.com>
In-Reply-To: <6cd67420-ab30-4920-ba3b-7ef28a8b0931@alk.com>
X-Enigmail-Version: 1.4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 217.196.146.213
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] gpspipe timeout on select (fd==0)
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Aug 2012 17:57:18 -0000

On 08/06/2012 07:12 PM, George Lutz wrote:
> I can build and run the gpspipe example from the gpsd-3.7 library.  However, the select( ) on the gps fd always times out.  I assume it's because the fd returned from gps_open is always 0 (stdin), which is odd because gps_open( ) does succeed when I pass it localhost:<validport>.

gps_open doesn't return a fd. See libgps(3).

Where did you find that gpspipe example you are talking about? The libgps
package in Ubuntu/Debian doesn't ship examples.

>  
> In comparison, just running the gpspipe binary included in the gpsd library does work ok.  This happens on 2 ubuntu systems using gcc to compile.  I'm looking for ways to further debug this but if gps_open( ) is returning a bad fd, I'm not sure why that would be or how I can work with that.
>  
> Thanks for any help.


-- 
 Bernd Zeimetz                            Debian GNU/Linux Developer
 http://bzed.de                                http://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F


From MAILER-DAEMON Thu Aug 09 06:56:25 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzQPh-0002vJ-6I
	for mharc-gpsd-dev@gnu.org; Thu, 09 Aug 2012 06:56:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43056)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzQPf-0002u6-9o
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 06:56:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzQPd-0004Aq-LA
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 06:56:23 -0400
Received: from nm18.bullet.mail.bf1.yahoo.com ([98.139.212.177]:29385)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzQPd-0004AI-Fn
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 06:56:21 -0400
Received: from [98.139.212.144] by nm18.bullet.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 10:56:20 -0000
Received: from [98.139.212.243] by tm1.bullet.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 10:56:20 -0000
Received: from [127.0.0.1] by omp1052.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 10:56:20 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 477975.3888.bm@omp1052.mail.bf1.yahoo.com
Received: (qmail 12143 invoked by uid 60001); 9 Aug 2012 10:56:20 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024;
	t=1344509780; bh=D8qKtsYGdFSR6J/XFmSoMCwSQEckYONz66T4c8XnOEM=;
	h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=LONKt5eUrc3qnFtRRENsKQ/Gc4lNhKnWelkSaZ6aOUuHDa69M2JgFueSKJRJDXVUAKZU7RdY4B6mO3yxJ1tB9AXWyX6rsgyhrH0quRNfuXkNdoZ+Jw+MMqY39EhOgkJ2pKG+80NMyCKedeMYAfrsk10yV/VzECMc1Fa6oISYTgk=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;
	h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=saCfvhpVS/ecpfBfXz6mKra8aXzOafQeZXhM+Y90UTEl8DOl3uauf/lENaihEosq3JqAoyzcs4flIxZmeJPUu1+QRpYdm0mgWRV/vIu8Fqt773lDULVOYFkrd4B28YOsm/tGm8S0ygR8MIIBib0hIW94UjlnUiv1pVZH91f9xNI=;
X-YMail-OSG: R08mWKAVM1nIIfbLtGlhPeBe3rp82VBbI3nIcB84n51AkFo
	jLI7gXOgvhpROzdzpku2IwkeO2NSvp2d5F2X7lSkVvgSyMVQZlrRssg7IWU6
	I0Fh4Z9f4OXJvcOEO976E41JmAxaEXQKLjmSX6VeYw2lU0HQGs0NrF2s5lQG
	CqTCfWKjLKR95UL4Tr7jGrsN_9wT8FGtvQitP_IVU05tYZs5W1qnj.tckIxq
	OBJHoGTgBsFCC7m.k6Kba.ptme2ZqS2etpSlTgSyVQcvz8mVKvL_9MahFZ5n
	wXyKUzoQ1BAYEglyZ7fygQ1tGe6IFH_0KuMiHvs_hwIDjpMtriiV5v0alAcl
	rv5C8m8u7EPiG4G1FGaLHAIuQQ.ms4CtbaRrfsZCi8YRnCJGNfTBxp2isO0K
	ek_1aBtaltC.IuwH6VfTVlbs0CD0EmAMxeeqexuve8ZDIX4qeacZbYBsOoYQ
	Lp97FBXhr8l.o.xVQ3RmrWNVlHUKEiOPeyAIeGUjkN3lJvWLls1J4WOh2CHb
	gNnpuOIV0UwdVQKA.oD54R8TsqigfjfBuzZk99xnfxY3BYTrizet_oWYldx7
	DG2lWVczOIvFbcO5HxT2zBZiG67kCiI9ju2Uz01WVvWwf2veYrOX_eccTwVJ
	FZymqpis8sXsD7h8IWQ--
Received: from [124.168.18.176] by web142602.mail.bf1.yahoo.com via HTTP;
	Thu, 09 Aug 2012 03:56:20 PDT
X-Mailer: YahooMailWebService/0.8.120.356233
References: <1342706333.53559.YahooMailNeo@web142605.mail.bf1.yahoo.com>
	<20120731040907.GA15166@thyrsus.com>
Message-ID: <1344509780.11836.YahooMailNeo@web142602.mail.bf1.yahoo.com>
Date: Thu, 9 Aug 2012 03:56:20 -0700 (PDT)
From: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
To: "esr@thyrsus.com" <esr@thyrsus.com>
In-Reply-To: <20120731040907.GA15166@thyrsus.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 98.139.212.177
Cc: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Subject: Re: [gpsd-dev] Mingw port
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Aug 2012 10:56:24 -0000

Hi Eric,=0A=0AThat initial mingw port was just =0Afor exploratory purposes.=
 It's served that purpose; I know now what the =0Amajor stumbling blocks ar=
e.=0A=0AHere is another branch, containing solely cleanups, all of which I =
believe are suitable to merge:=0A=0Ahttps://github.com/ukyg9e5r6k7gubiekd6/=
gpsd/tree/cleanups=0A=0APlease pull, or cherry-pick, or tell me how to reme=
dy, as you see fit.=0A=0AThis compiles cleanly under Linux, all regression =
tests pass, it's 100% splint-clean and it's almost cppcheck-clean.=0AThe tw=
o remaining errors from cppcheck look like a bug in it:=0A=0Alibgps_sock.c:=
334: error: sscanf =0Awidth 8 in format string (no. 1) is larger than desti=
nation, use %-1s to prevent overflowing destination: tag[0]=0Alibgps_sock.c=
:407: error: sscanf width 8 in format string (no. 1) is =0Alarger than dest=
ination, use %-1s to prevent overflowing destination: =0Atag[0]=0A=0A=0ASpl=
int seems to be using sizeof(tag[0])=3D=3D1 (too small), rather than sizeof=
(tag)=3D=3DMAXTAGLEN+1=3D=3D9 (just big enough) as it should.=0A=0AI've bee=
n unable to find any way to silence =0Athese cppcheck errors, while still k=
eeping both splint and the compiler happy and getting executables that actu=
ally work.=0AI'm not going to start hacking on cppcheck just now, so I've r=
eluctantly given up on this.=0A=0ARegards,=0A=0AMatt=0A=0A=0A=0A----- Origi=
nal Message -----=0AFrom: Eric S. Raymond <esr@thyrsus.com>=0ATo: Ukygerkgu=
biekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>=0ACc: "gpsd-dev@nongnu=
.org" <gpsd-dev@nongnu.org>=0ASent: Tuesday, 31 July 2012 2:09 PM=0ASubject=
: Re: [gpsd-dev] Mingw port=0A=0AUkygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7=
gubiekd6@yahoo.com>:=0A> However, Windows has a completely different set of=
 APIs for serial comms, and for timing/handshaking/waiting etc.=0A> =0A> To=
 get drivers, the daemon and the regression tests working under Windows hen=
ce requires some abstraction layer over those differences.=0A> =0A> My idea=
 is that such a layer could also incorporate the existing differences betwe=
en shm, dbus, QT, sockets and fds.=0A> Your comments appreciated!=0A=0ASoun=
ds useful if done right, but quite ugly and obtrusive if done wrong.=0A=0AI=
 am, at least, open to refactoring changes that would narrow thw coupling t=
o =0Athe base OS.=A0 Most of the changes would be in gpsd.c and serial.c, c=
orrect?=0A-- =0A=A0=A0=A0 =A0=A0=A0 <a href=3D"http://www.catb.org/~esr/">E=
ric S. Raymond</a>=0A


From MAILER-DAEMON Thu Aug 09 08:53:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzSEW-0000Sn-60
	for mharc-gpsd-dev@gnu.org; Thu, 09 Aug 2012 08:53:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35714)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzSET-0000Sa-Nm
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 08:52:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzSEO-0004uD-IU
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 08:52:57 -0400
Received: from nm21-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.137]:35744)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzSEO-0004u5-DQ
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 08:52:52 -0400
Received: from [98.139.212.144] by nm21.bullet.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 12:52:51 -0000
Received: from [98.139.212.199] by tm1.bullet.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 12:52:51 -0000
Received: from [127.0.0.1] by omp1008.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 12:52:51 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 793758.96173.bm@omp1008.mail.bf1.yahoo.com
Received: (qmail 44443 invoked by uid 60001); 9 Aug 2012 12:52:51 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024;
	t=1344516771; bh=CNCsqM6sJJ/rhmBoowxoiASjNOIVp8aN4aOz9hN9qeU=;
	h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=NHB06aD9hcaEcd4o0J5X6m+Ovy+OLjbo/hZi1hKDKNg0hiiOrlTSHUYcGp35l+nzAA/SwdmEjRgGIctBosh4/KdnQVjZYJtUA8hT4LoYoOlD8GoVz5uzABY7jqXD2khyY/aJK/92Je3lNVY4WYt9wkHPwszGZOb0I4xx1ZnW728=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;
	h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=vTA4+Ufu1Lvmjb8jEQMU7Vi9sSvvXZ9QFZrNEUfQAW6dmA8dmc/QFzi9rf8XKyAri4FpUUtR9k3YucVg9iuI2T4Eed1DZeU1jPpu9TOfPzb6+3/4K9Pc4lUZzwlBdTXggD5Z55XO0EMkqq/68NfF0vJfwuUH4DT1+EbHVafXADY=;
X-YMail-OSG: rMpWZbQVM1mXIOwq021rZqMeOtasCdAAeoVkUL1vQG2IRm1
	OYQfwm0tZrfewdl0HGz_PPAmvHgfnjz.K1vXvlCLq._aqjcQf1eD44u3ETq1
	u0Q5v5nRcb4H6YlC0m3_DAIeduxLf72ugVvFtE6p9rjxbh6Ly4d6_mfkuXfb
	RcRmS0dppLhsWvvwV_m6MQrmoPG9vlbGHeOlG8IuOo0Yq5O3MEc6k7JVj6dv
	eQfIELk0X1QEXY6f7gSc4QElX7rQhG6bjmgrokG3nw7EmhBmP8Of3zQXX3c_
	nAlVjPgRKFA8cuDgDSe5sNhLeog8CUHKTDalOzAMOTMC8xURA.9Du3J02sOo
	vR3aWY8by0t_0Cy6O2JHsIWrxqOECw7EDeb6LaNxKHp7LwGcvfvHQzSLC7NJ
	hXVk6wdEurCR3jl1T.orktzWiDwgJBvU1I2wZz2SRwk6R6TkoRasvii_swat
	rUvtMFTuu2gfzf1ojTYkLewwnkl6u8EM.KkSpv0MpkJEJythms6RWLsuCxlc
	QO_yU5T9c0H2RhAoHr3v3XTvEeMZqXCodiXe61cxZEf.Wd9rScgi6l.T3tWv
	rZ_jfrO3abKXjIx5IeiOF_DMAM6EHxrbVF_uuckNxiruyVS9TeIee
Received: from [124.168.18.176] by web142605.mail.bf1.yahoo.com via HTTP;
	Thu, 09 Aug 2012 05:52:51 PDT
X-Mailer: YahooMailWebService/0.8.120.356233
References: <1342706333.53559.YahooMailNeo@web142605.mail.bf1.yahoo.com>
	<20120731040907.GA15166@thyrsus.com>
Message-ID: <1344516771.3717.YahooMailNeo@web142605.mail.bf1.yahoo.com>
Date: Thu, 9 Aug 2012 05:52:51 -0700 (PDT)
From: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
To: "esr@thyrsus.com" <esr@thyrsus.com>
In-Reply-To: <20120731040907.GA15166@thyrsus.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 98.139.213.137
Cc: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Subject: Re: [gpsd-dev] Mingw port
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Aug 2012 12:52:59 -0000

Regarding serial.c and gpsd.c: yes, these are problematic for a Windows =0A=
port. But I now feel that this is a problem for later on.=0A=0A=0AFrom Goog=
ling, it seems to me that most Windows users interested in GPSd =0Awant a l=
ibgps.dll (=3D=3Dlibgps.so) that they can call into from their GUI =0Aprogr=
ams.There seems to be much less demand for a fully-featured daemon on Windo=
ws.=0AI imagine this is partly =0Abecause many vendors ship poor-quality Wi=
ndows software with their =0Adevices, but it's probably also partly due to =
the fact that Windows is more often used to run client-side GUI programs th=
an UI-less server daemons like GPSd.=0A=0A=0AMy experience with the mingw =
=0Abranch has taught me that a client-only port can be done much more =0Aea=
sily and more cleanly than a full daemon-too port.So I feel that if we ever=
 do a daemon port to Windows, we should do it only after a client-only port=
 has been bedded down.=0A=0AConsequently I believe we should proceed as fol=
lows:=0A=0A1. Get preparatory cleanups in (see my previous message), then=
=0A2. Gradually trickle in only the client changes from the mingw branch, =
=0Acleaning them up as I go, and this time in more granular commits that ar=
e =0Aeach 'obviously right'; then=0A3. Pause one release, watch for regress=
ions, give everyone a good opportunity to read/criticise/improve the change=
s so far; then=0A4. Commence a better-informed discussion about how to get =
a fully-featured daemon =0Aworking on Windows *without* littering the sourc=
e tree with Win32 API=0A calls and '#ifdef _WIN32', but also without re-inv=
enting Cygwin.=0A=0AIt may be that the outcome of 4 is that the ugliness is=
 too high, and the demand too low, to proceed with a daemon-too port.=0ATha=
t would be rather sad, but even then we would have accomplished a useful cl=
ient-only Windows port.=0A=0ARegards,=0A=0AMatt=0A=0A=0A=0A----- Original M=
essage -----=0AFrom: Eric S. Raymond <esr@thyrsus.com>=0ATo: Ukygerkgubiekd=
 Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>=0ACc: "gpsd-dev@nongnu.org"=
 <gpsd-dev@nongnu.org>=0ASent: Tuesday, 31 July 2012 2:09 PM=0ASubject: Re:=
 [gpsd-dev] Mingw port=0A=0AUkygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubie=
kd6@yahoo.com>:=0A> However, Windows has a completely different set of APIs=
 for serial comms, and for timing/handshaking/waiting etc.=0A> =0A> To get =
drivers, the daemon and the regression tests working under Windows hence re=
quires some abstraction layer over those differences.=0A> =0A> My idea is t=
hat such a layer could also incorporate the existing differences between sh=
m, dbus, QT, sockets and fds.=0A> Your comments appreciated!=0A=0ASounds us=
eful if done right, but quite ugly and obtrusive if done wrong.=0A=0AI am, =
at least, open to refactoring changes that would narrow thw coupling to =0A=
the base OS.=A0 Most of the changes would be in gpsd.c and serial.c, correc=
t?=0A-- =0A=A0=A0=A0 =A0=A0=A0 <a href=3D"http://www.catb.org/~esr/">Eric S=
. Raymond</a>=0A


From MAILER-DAEMON Thu Aug 09 09:13:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzSYQ-000506-KD
	for mharc-gpsd-dev@gnu.org; Thu, 09 Aug 2012 09:13:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42584)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1SzSYL-0004zh-1N
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 09:13:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1SzSYG-0003EG-Oa
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 09:13:28 -0400
Received: from mailout01.t-online.de ([194.25.134.80]:54683)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1SzSYG-0003E6-E5
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 09:13:24 -0400
Received: from fwd09.aul.t-online.de (fwd09.aul.t-online.de )
	by mailout01.t-online.de with smtp 
	id 1SzSYC-0001W7-R9; Thu, 09 Aug 2012 15:13:20 +0200
Received: from localhost
	(GcXPWaZfwhwBZZfxCCL9Oc3sFPvsLkcHnxusTSfLFzP2Gu1-ZRgltumHVwksGTgQ8O@[172.20.101.250])
	by fwd09.aul.t-online.de
	with esmtp id 1SzSXy-0nzbHc0; Thu, 9 Aug 2012 15:13:06 +0200
MIME-Version: 1.0
Received: from 89.183.70.216:60815 by cmpweb35.aul.t-online.de with HTTP/1.1
	(NGCS V4-0-6-4 on API V3-11-12-2)
In-Reply-To: <1344516771.3717.YahooMailNeo@web142605.mail.bf1.yahoo.com>
References: <1344516771.3717.YahooMailNeo@web142605.mail.bf1.yahoo.com>
Date: Thu, 09 Aug 2012 15:13:06 +0200
To: "Ukygerkgubiekd Ukygerkgubiekd" <ukyg9e5r6k7gubiekd6@yahoo.com>,
	esr@thyrsus.com
X-Priority: 3
X-UMS: email
X-Mailer: DTAG NGCS V4-0-6-4
From: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Message-ID: <1SzSXy-0nzbHc0@fwd09.aul.t-online.de>
X-ID: GcXPWaZfwhwBZZfxCCL9Oc3sFPvsLkcHnxusTSfLFzP2Gu1-ZRgltumHVwksGTgQ8O@t-dialin.net
X-TOI-MSGID: 99e1d79c-f79e-4f70-b594-93394e45a390
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 194.25.134.80
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] =?utf-8?q?Mingw_port?=
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Aug 2012 13:13:33 -0000

Hello,

i have done a few basic investigations using the library as a windows dll too, the only a bit problematic file i found is netlib.c.
(An openCPN on windows with an network connection to a gpsd would be great...)

Do you expect to have a source tree, where i can compile libgps.dll for a 32 bit and/or a 64 bit windows, ready within the next few weeks?

Regarding the port of the daemon to windows, i can provide and test the nmea2000 part.

Reinhard 

-----Original-Nachricht-----
Von: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
An: "esr@thyrsus.com" <esr@thyrsus.com>
Cc: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Betreff: Re: [gpsd-dev] Mingw port
Datum: Thu, 09 Aug 2012 14:52:51 +0200

Regarding serial.c and gpsd.c: yes, these are problematic for a Windows 
port. But I now feel that this is a problem for later on.


>From Googling, it seems to me that most Windows users interested in GPSd 
want a libgps.dll (==libgps.so) that they can call into from their GUI 
programs.There seems to be much less demand for a fully-featured daemon on Windows.
I imagine this is partly 
because many vendors ship poor-quality Windows software with their 
devices, but it's probably also partly due to the fact that Windows is more often used to run client-side GUI programs than UI-less server daemons like GPSd.


My experience with the mingw 
branch has taught me that a client-only port can be done much more 
easily and more cleanly than a full daemon-too port.So I feel that if we ever do a daemon port to Windows, we should do it only after a client-only port has been bedded down.

Consequently I believe we should proceed as follows:

1. Get preparatory cleanups in (see my previous message), then
2. Gradually trickle in only the client changes from the mingw branch, 
cleaning them up as I go, and this time in more granular commits that are 
each 'obviously right'; then
3. Pause one release, watch for regressions, give everyone a good opportunity to read/criticise/improve the changes so far; then
4. Commence a better-informed discussion about how to get a fully-featured daemon 
working on Windows *without* littering the source tree with Win32 API
 calls and '#ifdef _WIN32', but also without re-inventing Cygwin.

It may be that the outcome of 4 is that the ugliness is too high, and the demand too low, to proceed with a daemon-too port.
That would be rather sad, but even then we would have accomplished a useful client-only Windows port.

Regards,

Matt



----- Original Message -----
From: Eric S. Raymond <esr@thyrsus.com>
To: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
Cc: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Sent: Tuesday, 31 July 2012 2:09 PM
Subject: Re: [gpsd-dev] Mingw port

Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>:
> However, Windows has a completely different set of APIs for serial comms, and for timing/handshaking/waiting etc.
> 
> To get drivers, the daemon and the regression tests working under Windows hence requires some abstraction layer over those differences.
> 
> My idea is that such a layer could also incorporate the existing differences between shm, dbus, QT, sockets and fds.
> Your comments appreciated!

Sounds useful if done right, but quite ugly and obtrusive if done wrong.

I am, at least, open to refactoring changes that would narrow thw coupling to 
the base OS.  Most of the changes would be in gpsd.c and serial.c, correct?
-- 
        <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>







From MAILER-DAEMON Thu Aug 09 10:53:16 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SzU6u-0002ea-1v
	for mharc-gpsd-dev@gnu.org; Thu, 09 Aug 2012 10:53:16 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58640)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzU6k-0002aI-J2
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 10:53:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzU6j-0003Fl-1q
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 10:53:06 -0400
Received: from nm27-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.139]:31797)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ukyg9e5r6k7gubiekd6@yahoo.com>) id 1SzU6i-0003Ff-Sc
	for gpsd-dev@nongnu.org; Thu, 09 Aug 2012 10:53:04 -0400
Received: from [98.139.212.145] by nm27.bullet.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 14:53:04 -0000
Received: from [98.139.212.230] by tm2.bullet.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 14:53:04 -0000
Received: from [127.0.0.1] by omp1039.mail.bf1.yahoo.com with NNFMP;
	09 Aug 2012 14:53:04 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 267013.60565.bm@omp1039.mail.bf1.yahoo.com
Received: (qmail 88463 invoked by uid 60001); 9 Aug 2012 14:53:04 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024;
	t=1344523984; bh=Bl0CFNRXMQPlIFpS5g20POP72RAmuAtH6A7Whkz4Ph4=;
	h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=2NOrUT0/IiLtl/DSdjuFrcPMOOvId43X9nllH6F1X1wXm06DIMcPlyJXcvbt+aK9lGLAvuKKHQWMpnWJHBmIaF9EyAsSt4tpYtnENY5ns8GwClAsrRyOgpA7qxhdKByDmQr2FrYdsW7ug5m+Cs+9WFcGc4xzfYRq3kz2L0H7AR0=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;
	h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=WQq7ZUOLHbftjGFJEUNOBcGLrQfCs8667VxzkD2Ur8K9LZYAhd8do7qGW99s1D74HSoc3b+HpEn/jAeYWudcftcnPN3WBJvzGxIvrSUON9Ng8nimdysodvUDB2FyQIoCy69UYpgAzEDlyJW67WlLHzK8gvJTF2F98PceNzti1zs=;
X-YMail-OSG: SnoFET4VM1mJF9KgSKBHPv1TUUVQeKLaWqckmaepj9O9LPt
	X0Ob8wd18TbkcRt3NefnDj91dvQfrH6qhIELzj.ewJVEo9asK7upQ6f5S0L2
	da41BUCE6CuSL_YgngYJ7B3vRsw62FcyeIlwFMP3KlITnZjJA3e5BTA26LnC
	r2y0eoM4mqenUNBMmF40c2CxYFXxZHgemVT_2lHsKwKy.a5bq.mYmPHZeGJm
	0vwP5yVoaFy1syo_o72gtIoweJOR1VdRyUNHtmDk.zJ4rIgRSGhELFHFfF1x
	Y6aypMuNK94rWOUCoAfYMWj.glY49CBD0kVAawVXPG0AW6Qq.dmxGofP7DLc
	GRxxdm0KEbQ3gcDloXubC2xdhJqsNtajaxFJ3rrV_K_9Nq7lPYWI_obbtOmY
	K6EGcDwXtqQw1PBtsKutCZiK6bMMFw8lf62gBzByfNkCOmT9.AMk3KuIneLc
	juSnDpLEI6Hw32HMQuUy1Zg6g_0QyUGUnqCAvR_sQcTb2OghB9bNDdyBVE0i
	tdkfPqeV5F7aaafJRl82zKnhbrcTk.wT6EwVafDKRkg61BYHW1YIFTWPyt_e
	4FG9Mq1aeSvAXR8BGYFh9t7_d7w_KLbmwpZiXvlTHx.OofNcT9t8BWtwPRRw
	MDQLFzBFlPiyIQaSvTqPx_b.XLEajxhQtrB3aPk7Y3LefyStVfmkuJB1k
Received: from [124.168.18.176] by web142604.mail.bf1.yahoo.com via HTTP;
	Thu, 09 Aug 2012 07:53:04 PDT
X-Mailer: YahooMailWebService/0.8.120.356233
References: <1344516771.3717.YahooMailNeo@web142605.mail.bf1.yahoo.com>
	<1SzSXy-0nzbHc0@fwd09.aul.t-online.de> 
Message-ID: <1344523984.70158.YahooMailNeo@web142604.mail.bf1.yahoo.com>
Date: Thu, 9 Aug 2012 07:53:04 -0700 (PDT)
From: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>,
	"esr@thyrsus.com" <esr@thyrsus.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 98.139.213.139
Cc: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>
Subject: Re: [gpsd-dev] Mingw port
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 09 Aug 2012 14:53:15 -0000

Hi Reinhardt,=0A=0AOpenCPN looks very cool, and is exactly the sort of use =
case I had in mind. I'm glad to hear I'm not alone!=0A=0AHowever, I'm sorry=
 to say, a client-only port to Windows that is clean enough to merge into m=
ainline is almost certainly more than a few weeks away.=0A=0AFor something =
immediate, you could look at the existing mingw branch.=0AIt's suitable as =
a source of inspiration for future cleaner changes, but probably not as a b=
ase to work from.That said, it's here:=0A=0Ahttps://github.com/ukyg9e5r6k7g=
ubiekd6/gpsd/tree/mingw=0A=0AThis compiles to a libgps.dll and some client =
executables built on it, including a cgps.exe that can connect to a remote =
port 2947.=0AHowever, I never actually tried to connect any of the executab=
les to a running gpsd - I was only trying to map out the problem space.=0AI=
 expect there will be dumb and easily-fixed bugs lurking in netlib.c, due t=
o mismatches between BSD sockets and winsock.=0A=0AIt needs pdcurses and pt=
hreads-win32 (both open source) to build and run.=0A=0ASo far I only built =
this for 32-bit Windows, using both a 32-bit-Linux-hosted mingw32-target cr=
oss compiler, and also a native Windows mingw32 compiler.=0AI think it woul=
d compile cleanly under mingw-w64 (native or cross-compiler) too, but I nev=
er actually tried that.=0A=0AUnder Windows, building the mingw branch from =
source goes like:=0A1. Point scons at the mingw compiler using (for example=
) "target =3D 'i686-w64-mingw32'"=0A2. Run scons from a Cygwin shell to gen=
erate gpsd.h, gpsd_config.h etc. No need for rest of Cygwin compilation.=0A=
3. From a mingw shell, build using 'make -f Makefile.mingw'.=0A=0AObviously=
, this is far from ideal. It's like this because mingw native builds of pyt=
hon and scons don't seem to be readily available, nor easily creatable.=0A=
=0AThank you very much for your offer of testing nmea2000 support on Window=
s.=0AI'll certainly need your help with this, as I don't have nmea2000 hard=
ware here.=0A=0AHerzliche grusse,=0A=0AMatt=0A=0A=0A----- Original Message =
-----=0AFrom: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>=0ATo:=
 Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>; esr@thyrsus=
.com=0ACc: gpsd-dev@nongnu.org=0ASent: Thursday, 9 August 2012 11:13 PM=0AS=
ubject: Re: [gpsd-dev] Mingw port=0A=0AHello,=0A=0Ai have done a few basic =
investigations using the library as a windows dll too, the only a bit probl=
ematic file i found is netlib.c.=0A(An openCPN on windows with an network c=
onnection to a gpsd would be great...)=0A=0ADo you expect to have a source =
tree, where i can compile libgps.dll for a 32 bit and/or a 64 bit windows, =
ready within the next few weeks?=0A=0ARegarding the port of the daemon to w=
indows, i can provide and test the nmea2000 part.=0A=0AReinhard =0A=0A-----=
Original-Nachricht-----=0AVon: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gu=
biekd6@yahoo.com>=0AAn: "esr@thyrsus.com" <esr@thyrsus.com>=0ACc: "gpsd-dev=
@nongnu.org" <gpsd-dev@nongnu.org>=0ABetreff: Re: [gpsd-dev] Mingw port=0AD=
atum: Thu, 09 Aug 2012 14:52:51 +0200=0A=0ARegarding serial.c and gpsd.c: y=
es, these are problematic for a Windows =0Aport. But I now feel that this i=
s a problem for later on.=0A=0A=0AFrom Googling, it seems to me that most W=
indows users interested in GPSd =0Awant a libgps.dll (=3D=3Dlibgps.so) that=
 they can call into from their GUI =0Aprograms.There seems to be much less =
demand for a fully-featured daemon on Windows.=0AI imagine this is partly =
=0Abecause many vendors ship poor-quality Windows software with their =0Ade=
vices, but it's probably also partly due to the fact that Windows is more o=
ften used to run client-side GUI programs than UI-less server daemons like =
GPSd.=0A=0A=0AMy experience with the mingw =0Abranch has taught me that a c=
lient-only port can be done much more =0Aeasily and more cleanly than a ful=
l daemon-too port.So I feel that if we ever do a daemon port to Windows, we=
 should do it only after a client-only port has been bedded down.=0A=0ACons=
equently I believe we should proceed as follows:=0A=0A1. Get preparatory cl=
eanups in (see my previous message), then=0A2. Gradually trickle in only th=
e client changes from the mingw branch, =0Acleaning them up as I go, and th=
is time in more granular commits that are =0Aeach 'obviously right'; then=
=0A3. Pause one release, watch for regressions, give everyone a good opport=
unity to read/criticise/improve the changes so far; then=0A4. Commence a be=
tter-informed discussion about how to get a fully-featured daemon =0Aworkin=
g on Windows *without* littering the source tree with Win32 API=0Acalls and=
 '#ifdef _WIN32', but also without re-inventing Cygwin.=0A=0AIt may be that=
 the outcome of 4 is that the ugliness is too high, and the demand too low,=
 to proceed with a daemon-too port.=0AThat would be rather sad, but even th=
en we would have accomplished a useful client-only Windows port.=0A=0ARegar=
ds,=0A=0AMatt=0A=0A=0A=0A----- Original Message -----=0AFrom: Eric S. Raymo=
nd <esr@thyrsus.com>=0ATo: Ukygerkgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiek=
d6@yahoo.com>=0ACc: "gpsd-dev@nongnu.org" <gpsd-dev@nongnu.org>=0ASent: Tue=
sday, 31 July 2012 2:09 PM=0ASubject: Re: [gpsd-dev] Mingw port=0A=0AUkyger=
kgubiekd Ukygerkgubiekd <ukyg9e5r6k7gubiekd6@yahoo.com>:=0A> However, Windo=
ws has a completely different set of APIs for serial comms, and for timing/=
handshaking/waiting etc.=0A> =0A> To get drivers, the daemon and the regres=
sion tests working under Windows hence requires some abstraction layer over=
 those differences.=0A> =0A> My idea is that such a layer could also incorp=
orate the existing differences between shm, dbus, QT, sockets and fds.=0A> =
Your comments appreciated!=0A=0ASounds useful if done right, but quite ugly=
 and obtrusive if done wrong.=0A=0AI am, at least, open to refactoring chan=
ges that would narrow thw coupling to =0Athe base OS.=A0 Most of the change=
s would be in gpsd.c and serial.c, correct?=0A-- =0A=A0=A0=A0 =A0=A0=A0 <a =
href=3D"http://www.catb.org/~esr/">Eric S. Raymond</a>=0A


From MAILER-DAEMON Tue Aug 14 11:38:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1JCe-0000sc-Rh
	for mharc-gpsd-dev@gnu.org; Tue, 14 Aug 2012 11:38:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55354)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cjac@colliertech.org>) id 1T0zsG-0008OY-IN
	for gpsd-dev@nongnu.org; Mon, 13 Aug 2012 15:00:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <cjac@colliertech.org>) id 1T0zsF-0005gP-J0
	for gpsd-dev@nongnu.org; Mon, 13 Aug 2012 15:00:24 -0400
Received: from mail-yx0-f173.google.com ([209.85.213.173]:40151)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <cjac@colliertech.org>) id 1T0zsF-0005gB-FD
	for gpsd-dev@nongnu.org; Mon, 13 Aug 2012 15:00:23 -0400
Received: by yenm4 with SMTP id m4so3373578yen.4
	for <gpsd-dev@nongnu.org>; Mon, 13 Aug 2012 12:00:22 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=message-id:subject:from:to:date:content-type:x-mailer:mime-version
	:x-gm-message-state;
	bh=Cusy2gv3x0/0/GMwAKsSuofZ8e7r1v9MR8PZHCqi7R8=;
	b=XQc+USwSTVf4TlH9Pv5EQEVlugQ6an5NnXQg9SvJXRJvoYHpvRLNqJDQWPuxra+/MA
	4R0MyP+ZgBGWAnX2adW9l8NKqM8GztmNcFEyzfXhaKc24TNZed7OfyHc0yd02/MX7GXL
	zkQlHRexZw50zO5cPcNgCmoVswmChjm8mOIklYB0w4b6AIecpGj1suC8JLrk8QACLk88
	wZH67FmIWDzfTSBQBdqokowevuxSWRal+9mQ5si41xzR2pKVkI5h+VkNhe86u2cipnaV
	q+2SdRGWZV4kxjZ0E6v/LVh7h4jIBTSM//8+x0BSY/k+vRfwi1MhBkFJH57o2DT8owAH
	L1jQ==
Received: by 10.50.190.234 with SMTP id gt10mr6837607igc.20.1344884421788;
	Mon, 13 Aug 2012 12:00:21 -0700 (PDT)
Received: from ?IPv6:2607:ff08:f5:100:44d6:5cff:fe59:775a?
	([2607:ff08:f5:100:44d6:5cff:fe59:775a])
	by mx.google.com with ESMTPS id hx4sm7752095igc.8.2012.08.13.12.00.19
	(version=TLSv1/SSLv3 cipher=OTHER);
	Mon, 13 Aug 2012 12:00:20 -0700 (PDT)
Message-ID: <1344884408.18116.23.camel@foxtrot.cjac.ntr.f5net.com>
From: "C.J. Adams-Collier KF7BMP" <cjac@colliertech.org>
To: gpsd-dev@nongnu.org
Date: Mon, 13 Aug 2012 12:00:08 -0700
Content-Type: multipart/signed; micalg="pgp-sha256";
	protocol="application/pgp-signature"; boundary="=-9XIEde/GBeJ6ISDS6rGf"
X-Mailer: Evolution 3.4.3-1 
Mime-Version: 1.0
X-Gm-Message-State: ALoCoQn5WAqnkywBi2aeaYeDp1xUjp/hqmMB6COwMTnhTgzkhaX/UA5/1Y8PifpU0beG0Lzwhqrn
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.213.173
X-Mailman-Approved-At: Tue, 14 Aug 2012 11:38:42 -0400
Subject: [gpsd-dev] My old Nexus One
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Aug 2012 19:00:26 -0000


--=-9XIEde/GBeJ6ISDS6rGf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hey folks,

I've got this Nexus One that I carry around with me because it's a
pretty neat piece of hardware.  But I go days at a time without using
it, since I don't have voice service on it and it's not always connected
to the net.

I was thinking I'd put a Debian chroot on it and put it in the rack.
I'm starting this telephone company, and I hear that having a local time
source is important for time-sensitive tasks like TDMA and whatnot.
I've been trying to get an old Delorme TripMate I was gifted set up for
this role.  But I've been unable to get it working.  I did get gpsd
sync'd up with ntpd, though.  That was pretty easy.

Have any of you got any experience using a Nexus One as a GPS source for
gpsd?  Got any pro tips?  I'm happy to write patches if necessary.

Cheers,

C.J.


--=-9XIEde/GBeJ6ISDS6rGf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAABCAAGBQJQKU64AAoJEEyimPmPQm23xTIH/3MbnXEDJnBaeb0oC56muDoR
Rx4pRLHipK0oOyC6JAXSuTC4wcEEqQYQjNvED6Tdau97nb3coeTwxmZOD4elhe8X
GH4k+faALBvcAfBNEfg12d9AZDLl5qwhMLY+zUyvyI7ekbAUrfbO8tz+Z5SZk53r
SETUo2wvOVZGTLCvKu5D5HV6YShXbd7VcxuIM/OZcIDfXGlz57MC6eLepwWmUbHt
hche6+esfEFd/849G1tIRZlk7+TG8YpWbNt+SeyDUW1xNRDixbkzP+yni18bIMRK
I1xv+gz7BuhX/9GTuU3a/MgWqN923i05ddqV4frEX1KY5I+T16rdntGxUpxbZFY=
=SorI
-----END PGP SIGNATURE-----

--=-9XIEde/GBeJ6ISDS6rGf--



From MAILER-DAEMON Tue Aug 14 11:52:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1JQA-0005bG-KR
	for mharc-gpsd-dev@gnu.org; Tue, 14 Aug 2012 11:52:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40244)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1T1JQ7-0005aG-0W
	for gpsd-dev@nongnu.org; Tue, 14 Aug 2012 11:52:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1T1JQ4-0003hs-20
	for gpsd-dev@nongnu.org; Tue, 14 Aug 2012 11:52:38 -0400
Received: from mail-vb0-f45.google.com ([209.85.212.45]:51855)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tz2026@gmail.com>) id 1T1JQ3-0003hn-Tk
	for gpsd-dev@nongnu.org; Tue, 14 Aug 2012 11:52:35 -0400
Received: by vbip1 with SMTP id p1so467728vbi.4
	for <gpsd-dev@nongnu.org>; Tue, 14 Aug 2012 08:52:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type;
	bh=RGQ7MzGdE7h2WLEYm4jaMQxyteRaYT3lG0i8qaMWfJE=;
	b=IuHsUUI1QxslHZEBmPK7HuKw5pHij9gk/2stwname2LSrwRKuOObdxfwpgocdE7gmd
	j8O+vDqYLQgbDQS+QL0KFFBZ9z5n/qrITw+W8KoS+EXB2qgvgNDPZsM1Dw4Kf0HRPKMK
	7RZA+BvkVheg5L8sVakMu/fM4Hrz9BVivfnswFhHHfhk6vCJMjavYKHNNY6RMEGp3NBE
	fGuhjBAxYE7LJOa1w+bW2Asn3WPFaquMahwiVO6Bc4zvzUKYHT9KsA0waWhimmlfYO73
	/+xeDbsohMVddTgwZ6Oquy7fhGaSnbqUOpfd9BeFNzbkYv2AQ6TLB+AayXz4twhkm9I/
	D8Nw==
Received: by 10.52.93.170 with SMTP id cv10mr9497048vdb.78.1344959554881; Tue,
	14 Aug 2012 08:52:34 -0700 (PDT)
MIME-Version: 1.0
Sender: tz2026@gmail.com
Received: by 10.58.172.132 with HTTP; Tue, 14 Aug 2012 08:52:14 -0700 (PDT)
In-Reply-To: <1344884408.18116.23.camel@foxtrot.cjac.ntr.f5net.com>
References: <1344884408.18116.23.camel@foxtrot.cjac.ntr.f5net.com>
From: tz <thomas@mich.com>
Date: Tue, 14 Aug 2012 11:52:14 -0400
X-Google-Sender-Auth: 8A_RoDlmz_8Rl42eUFwQJiid7cc
Message-ID: <CAFv7OijM-JWB2zJg+rSaY995bka1ZBjKt78Wn85LmDn7=kESwg@mail.gmail.com>
To: "C.J. Adams-Collier KF7BMP" <cjac@colliertech.org>
Content-Type: multipart/alternative; boundary=20cf3071c7ca81869704c73bcc5e
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.45
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] My old Nexus One
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Aug 2012 15:52:41 -0000

--20cf3071c7ca81869704c73bcc5e
Content-Type: text/plain; charset=ISO-8859-1

If you are using it for something important, get a real GPS.  They aren't
that expensive and more accurate and convenient.  And if it is really,
really, important, get a professional time unit.

No need for rooting.  There are other apps, but here is one:

https://play.google.com/store/apps/details?id=com.cajax.gps2bt2

On Mon, Aug 13, 2012 at 3:00 PM, C.J. Adams-Collier KF7BMP <
cjac@colliertech.org> wrote:

> Hey folks,
>
> I've got this Nexus One that I carry around with me because it's a
> pretty neat piece of hardware.  But I go days at a time without using
> it, since I don't have voice service on it and it's not always connected
> to the net.
>
> I was thinking I'd put a Debian chroot on it and put it in the rack.
> I'm starting this telephone company, and I hear that having a local time
> source is important for time-sensitive tasks like TDMA and whatnot.
> I've been trying to get an old Delorme TripMate I was gifted set up for
> this role.  But I've been unable to get it working.  I did get gpsd
> sync'd up with ntpd, though.  That was pretty easy.
>
> Have any of you got any experience using a Nexus One as a GPS source for
> gpsd?  Got any pro tips?  I'm happy to write patches if necessary.
>
> Cheers,
>
> C.J.
>
>

--20cf3071c7ca81869704c73bcc5e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

If you are using it for something important, get a real GPS.=A0 They aren&#=
39;t that expensive and more accurate and convenient.=A0 And if it is reall=
y, really, important, get a professional time unit.<br><br>No need for root=
ing.=A0 There are other apps, but here is one:<br>

<br><a href=3D"https://play.google.com/store/apps/details?id=3Dcom.cajax.gp=
s2bt2">https://play.google.com/store/apps/details?id=3Dcom.cajax.gps2bt2</a=
><br><br><div class=3D"gmail_quote">On Mon, Aug 13, 2012 at 3:00 PM, C.J. A=
dams-Collier KF7BMP <span dir=3D"ltr">&lt;<a href=3D"mailto:cjac@colliertec=
h.org" target=3D"_blank">cjac@colliertech.org</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hey folks,<br>
<br>
I&#39;ve got this Nexus One that I carry around with me because it&#39;s a<=
br>
pretty neat piece of hardware. =A0But I go days at a time without using<br>
it, since I don&#39;t have voice service on it and it&#39;s not always conn=
ected<br>
to the net.<br>
<br>
I was thinking I&#39;d put a Debian chroot on it and put it in the rack.<br=
>
I&#39;m starting this telephone company, and I hear that having a local tim=
e<br>
source is important for time-sensitive tasks like TDMA and whatnot.<br>
I&#39;ve been trying to get an old Delorme TripMate I was gifted set up for=
<br>
this role. =A0But I&#39;ve been unable to get it working. =A0I did get gpsd=
<br>
sync&#39;d up with ntpd, though. =A0That was pretty easy.<br>
<br>
Have any of you got any experience using a Nexus One as a GPS source for<br=
>
gpsd? =A0Got any pro tips? =A0I&#39;m happy to write patches if necessary.<=
br>
<br>
Cheers,<br>
<br>
C.J.<br>
<br>
</blockquote></div><br>

--20cf3071c7ca81869704c73bcc5e--


From MAILER-DAEMON Wed Aug 15 12:14:38 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T1gEw-0005ho-RA
	for mharc-gpsd-dev@gnu.org; Wed, 15 Aug 2012 12:14:38 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42097)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aliceander@gmail.com>) id 1T1gEp-0005Jt-Rx
	for gpsd-dev@nongnu.org; Wed, 15 Aug 2012 12:14:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <aliceander@gmail.com>) id 1T1gEo-0003wg-NN
	for gpsd-dev@nongnu.org; Wed, 15 Aug 2012 12:14:31 -0400
Received: from mail-pb0-f45.google.com ([209.85.160.45]:49895)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <aliceander@gmail.com>) id 1T1gEo-0003wO-F9
	for gpsd-dev@nongnu.org; Wed, 15 Aug 2012 12:14:30 -0400
Received: by pbbrp12 with SMTP id rp12so24260pbb.4
	for <gpsd-dev@nongnu.org>; Wed, 15 Aug 2012 09:14:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:from:to:references:in-reply-to:subject:date:mime-version
	:content-type:x-priority:x-msmail-priority:importance:x-mailer
	:x-mimeole; bh=mbVgkT2VluTL3GX3LTlndfIfnwuPXhVWaIVSipj45CI=;
	b=bo2VmahDfbAiUfRkYxf/rNfg6R3Z3+ULYeXAfHsxPidUf7fbegeOxef67eAeYOzMAj
	mtVYHT4LlYrTZ49Epw9nUNlyNIbYvQiOuMPsPy+IDa+/lc7NkCPvje9I8exsSungYbL5
	DvFRS1eo7NaOpNk0yc3AsqzJsSMcjEVSSsbI5QwMIBFitmqqM8M/DILuQckpSRJxJUXN
	2lVYKfnPo2k5pYzVdH7AARjNS3Uom3JpET1kZFhcMgOFjY30vZs6vrPmqIi0XwOwNWbh
	S4DsdXDdNAsj3RdNvsm3d/DbEYJNyvpz/nnZSui6ZAp3uJqw9RX/6+XPrNjwpJdOJZ9S
	GA8A==
Received: by 10.68.203.67 with SMTP id ko3mr26822357pbc.126.1345047269177;
	Wed, 15 Aug 2012 09:14:29 -0700 (PDT)
Received: from clamp ([69.80.103.101])
	by mx.google.com with ESMTPS id gf7sm677826pbc.65.2012.08.15.09.14.27
	(version=SSLv3 cipher=OTHER); Wed, 15 Aug 2012 09:14:28 -0700 (PDT)
Message-ID: <DED89F9FF1D5442191D23847E3F9CD9F@clamp>
From: "aliceander" <aliceander@gmail.com>
To: <gpsd-dev@nongnu.org>
References: <1344884408.18116.23.camel@foxtrot.cjac.ntr.f5net.com>
	<CAFv7OijM-JWB2zJg+rSaY995bka1ZBjKt78Wn85LmDn7=kESwg@mail.gmail.com>
In-Reply-To: <CAFv7OijM-JWB2zJg+rSaY995bka1ZBjKt78Wn85LmDn7=kESwg@mail.gmail.com>
Date: Wed, 15 Aug 2012 09:14:27 -0700
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0006_01CD7AC6.5E9F64B0"
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 15.4.3555.308
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.160.45
Subject: [gpsd-dev] gpsd on freenas
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Aug 2012 16:14:36 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0006_01CD7AC6.5E9F64B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Has anyone run gpsd on freenas?  
------=_NextPart_000_0006_01CD7AC6.5E9F64B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<HTML><HEAD></HEAD>
<BODY dir=3Dltr>
<DIV dir=3Dltr>
<DIV style=3D"FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Has anyone run gpsd on freenas?&nbsp; =
</DIV></DIV></DIV></BODY></HTML>

------=_NextPart_000_0006_01CD7AC6.5E9F64B0--



From MAILER-DAEMON Mon Aug 20 18:53:37 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3aqn-00082r-I9
	for mharc-gpsd-dev@gnu.org; Mon, 20 Aug 2012 18:53:37 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47011)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T3aqk-00082L-GN
	for gpsd-dev@nongnu.org; Mon, 20 Aug 2012 18:53:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T3aqi-0005Ky-Rk
	for gpsd-dev@nongnu.org; Mon, 20 Aug 2012 18:53:34 -0400
Received: from mailout03.t-online.de ([194.25.134.81]:60123)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T3aqi-0005Ks-I3
	for gpsd-dev@nongnu.org; Mon, 20 Aug 2012 18:53:32 -0400
Received: from fwd23.aul.t-online.de (fwd23.aul.t-online.de )
	by mailout03.t-online.de with smtp 
	id 1T3aqg-0001Cs-US; Tue, 21 Aug 2012 00:53:30 +0200
Received: from localhost
	(ZknwMwZT8hKL40tLxtcg-U7n7B6nHjt36M6STDp9WW8dWifaW4Rj4dILqnHAU41w6V@[172.20.101.250])
	by fwd23.aul.t-online.de
	with esmtp id 1T3aqa-17nfhg0; Tue, 21 Aug 2012 00:53:24 +0200
MIME-Version: 1.0
Received: from 93.196.93.4:53479 by cmpweb57.aul.t-online.de with HTTP/1.1
	(NGCS V4-0-6-4 on API V3-11-12-2)
Date: Tue, 21 Aug 2012 00:53:24 +0200
To: "gpsd-dev" <gpsd-dev@nongnu.org>
X-Priority: 3
X-UMS: email
X-Mailer: DTAG NGCS V4-0-6-4
From: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Content-Type: multipart/alternative;
	boundary="=_b1bbf3283c73994816b0db69a7c03f92"
Message-ID: <1T3aqa-17nfhg0@fwd23.aul.t-online.de>
X-ID: ZknwMwZT8hKL40tLxtcg-U7n7B6nHjt36M6STDp9WW8dWifaW4Rj4dILqnHAU41w6V@t-dialin.net
X-TOI-MSGID: de424705-fad2-437f-ad24-10962830a01e
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 194.25.134.81
Subject: [gpsd-dev] Can not push to git.sv.gnu.org
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Aug 2012 22:53:35 -0000

--=_b1bbf3283c73994816b0db69a7c03f92
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Hallo, 

	git push fails (for me) since yesterday. 

	I do not have change the config of my pc (Lots of updates pf course)
as much as i remember 

	Here are the error messages: 

	git push xxxxxxxxx@git.sv.gnu.org:/srv/git/gpsd.git 

	Counting objects: 5, done. 

	Delta compression using up to 6 threads. 

	Compressing objects: 100% (3/3), done. 

	Writing objects: 100% (3/3), 992 bytes, done. 

	Total 3 (delta 2), reused 0 (delta 0) 

	remote: Traceback (most recent call last): 

	remote:   File "/usr/src/git/contrib/ciabot/ciabot.py", line 232, in
<module> 

	remote:     server.hub.deliver(message) 

	remote:   File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in
__call__ 

	remote:     return self.__send(self.__name, args) 

	remote:   File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in
__request 

	remote:     verbose=self.__verbose 

	remote:   File "/usr/lib/python2.6/xmlrpclib.py", line 1235, in
request 

	remote:     self.send_content(h, request_body) 

	remote:   File "/usr/lib/python2.6/xmlrpclib.py", line 1349, in
send_content 

	remote:     connection.endheaders() 

	remote:   File "/usr/lib/python2.6/httplib.py", line 908, in
endheaders 

	remote:     self._send_output() 

	remote:   File "/usr/lib/python2.6/httplib.py", line 780, in
_send_output 

	remote:     self.send(msg) 

	remote:   File "/usr/lib/python2.6/httplib.py", line 739, in send 

	remote:     self.connect() 

	remote:   File "/usr/lib/python2.6/httplib.py", line 720, in connect 

	remote:     self.timeout) 

	remote:   File "/usr/lib/python2.6/socket.py", line 561, in
create_connection 

	remote:     raise error, msg 

	remote: socket.error: [Errno 110] Connection timed out 

	remote: run-parts: hooks/update.d/ciabot exited with return code 1 

	remote: error: hook declined to update refs/heads/master 

	To xxxxxxxxxxx@git.sv.gnu.org:/srv/git/gpsd.git 

	! [remote rejected] master -> master (hook declined) 

	error: failed to push some refs to
'xxxxxxxxx@git.sv.gnu.org:/srv/git/gpsd.git' 

	Is this a problem a my side? 

	Thank you 

	Reinhard
--=_b1bbf3283c73994816b0db69a7c03f92
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html><head><title></title><meta http-equiv=3D"Content-Type" content=3D"tex=
t/html; charset=3DUTF-8"/></head><body><p style=3D"margin: 0px;">Hallo,</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">git push fails (for me) since yesterday.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">I do not have change the config of my pc (Lots of=
 updates pf course) as much as i remember</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Here are the error messages:</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">git push xxxxxxxxx@git.sv.gnu.org:/srv/git/gpsd.g=
it</p>
<p style=3D"margin: 0px;">Counting objects: 5, done.</p>
<p style=3D"margin: 0px;">Delta compression using up to 6 threads.</p>
<p style=3D"margin: 0px;">Compressing objects: 100% (3/3), done.</p>
<p style=3D"margin: 0px;">Writing objects: 100% (3/3), 992 bytes, done.</p>
<p style=3D"margin: 0px;">Total 3 (delta 2), reused 0 (delta 0)</p>
<p style=3D"margin: 0px;">remote: Traceback (most recent call last):</p>
<p style=3D"margin: 0px;">remote:   File "/usr/src/git/contrib/ciabot/ciabo=
t.py", line 232, in &lt;module&gt;</p>
<p style=3D"margin: 0px;">remote:     server.hub.deliver(message)</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/xmlrpclib.py",=
 line 1199, in __call__</p>
<p style=3D"margin: 0px;">remote:     return self.__send(self.__name, args)=
</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/xmlrpclib.py",=
 line 1489, in __request</p>
<p style=3D"margin: 0px;">remote:     verbose=3Dself.__verbose</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/xmlrpclib.py",=
 line 1235, in request</p>
<p style=3D"margin: 0px;">remote:     self.send_content(h, request_body)</p=
>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/xmlrpclib.py",=
 line 1349, in send_content</p>
<p style=3D"margin: 0px;">remote:     connection.endheaders()</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/httplib.py", l=
ine 908, in endheaders</p>
<p style=3D"margin: 0px;">remote:     self._send_output()</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/httplib.py", l=
ine 780, in _send_output</p>
<p style=3D"margin: 0px;">remote:     self.send(msg)</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/httplib.py", l=
ine 739, in send</p>
<p style=3D"margin: 0px;">remote:     self.connect()</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/httplib.py", l=
ine 720, in connect</p>
<p style=3D"margin: 0px;">remote:     self.timeout)</p>
<p style=3D"margin: 0px;">remote:   File "/usr/lib/python2.6/socket.py", li=
ne 561, in create_connection</p>
<p style=3D"margin: 0px;">remote:     raise error, msg</p>
<p style=3D"margin: 0px;">remote: socket.error: [Errno 110] Connection time=
d out</p>
<p style=3D"margin: 0px;">remote: run-parts: hooks/update.d/ciabot exited w=
ith return code 1</p>
<p style=3D"margin: 0px;">remote: error: hook declined to update refs/heads=
/master</p>
<p style=3D"margin: 0px;">To xxxxxxxxxxx@git.sv.gnu.org:/srv/git/gpsd.git</=
p>
<p style=3D"margin: 0px;">! [remote rejected] master -&gt; master (hook dec=
lined)</p>
<p style=3D"margin: 0px;">error: failed to push some refs to 'xxxxxxxxx@git=
.sv.gnu.org:/srv/git/gpsd.git'</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Is this a problem a my side?</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Thank you</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Reinhard</p></body></html>
--=_b1bbf3283c73994816b0db69a7c03f92--




From MAILER-DAEMON Tue Aug 21 11:56:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T3qoR-0008HY-5Q
	for mharc-gpsd-dev@gnu.org; Tue, 21 Aug 2012 11:56:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37997)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T3qoP-0008CC-AG
	for gpsd-dev@nongnu.org; Tue, 21 Aug 2012 11:56:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T3qoO-00024f-9S
	for gpsd-dev@nongnu.org; Tue, 21 Aug 2012 11:56:13 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:51829 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T3qoO-00024V-5C
	for gpsd-dev@nongnu.org; Tue, 21 Aug 2012 11:56:12 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id D5C05420DF; Tue, 21 Aug 2012 11:55:42 -0400 (EDT)
Date: Tue, 21 Aug 2012 11:55:42 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Message-ID: <20120821155542.GA21208@thyrsus.com>
References: <1T3aqa-17nfhg0@fwd23.aul.t-online.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1T3aqa-17nfhg0@fwd23.aul.t-online.de>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev <gpsd-dev@nongnu.org>
Subject: Re: [gpsd-dev] Can not push to git.sv.gnu.org
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Aug 2012 15:56:14 -0000

Reinhard.Arlt@t-online.de <Reinhard.Arlt@t-online.de>:
> 	git push fails (for me) since yesterday. 

I'm seeing the same issue.  I think it's a problem with ciabot.  I'll
investigate.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Wed Aug 22 04:14:15 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T464t-0001Nc-8b
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 04:14:15 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33392)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T464n-0001Kq-Va
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 04:14:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T464n-0003as-4C
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 04:14:09 -0400
Received: from mailout09.t-online.de ([194.25.134.84]:42651)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T464m-0003aj-Tn
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 04:14:09 -0400
Received: from fwd53.aul.t-online.de (fwd53.aul.t-online.de )
	by mailout09.t-online.de with smtp 
	id 1T464f-0003bq-M6; Wed, 22 Aug 2012 10:14:01 +0200
Received: from localhost
	(rXD6AaZJoh+X1Ksidt1nKQTmSKPipv7J11Lu9Kpp77qhgzW1T-jaB3Jd3ZormNOw0T@[172.20.101.250])
	by fwd53.aul.t-online.de
	with esmtp id 1T464a-1IGuAq0; Wed, 22 Aug 2012 10:13:56 +0200
MIME-Version: 1.0
Received: from 93.218.115.53:36152 by cmpweb34.aul.t-online.de with HTTP/1.1
	(NGCS V4-0-7-0 on API V3-11-14-0)
Date: Wed, 22 Aug 2012 10:13:56 +0200
To: "gpsd-dev" <gpsd-dev@nongnu.org>
X-Priority: 3
X-UMS: email
X-Mailer: DTAG NGCS V4-0-7-0
From: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Message-ID: <1T464a-1IGuAq0@fwd53.aul.t-online.de>
X-ID: rXD6AaZJoh+X1Ksidt1nKQTmSKPipv7J11Lu9Kpp77qhgzW1T-jaB3Jd3ZormNOw0T@t-dialin.net
X-TOI-MSGID: 8dd51c0f-1147-48cc-984c-a8956a2d8e4c
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 194.25.134.84
Subject: [gpsd-dev] Scaled AIS JSON messages...
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 08:14:13 -0000

Hello,

as much as i understand, the course in the gpsd ais type 1 message is scaled by ten, but the heading is not.

During test with the nmea2000 ais decoder, i see no difference for the course value, it is scaled by ten regardless if scaled is true a false.

Should i insert the course value also only as a number between 0 and 359?

Thank you

Reinhard





From MAILER-DAEMON Wed Aug 22 05:21:49 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T478H-000238-Jk
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 05:21:49 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48107)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T478C-00022v-Gw
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 05:21:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T4786-0007bq-Nx
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 05:21:44 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:39273)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T4786-0007ba-Hn
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 05:21:38 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id 273095E1CCA
	for <gpsd-dev@nongnu.org>; Wed, 22 Aug 2012 10:21:36 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 8NoFX9UDssCW for <gpsd-dev@nongnu.org>;
	Wed, 22 Aug 2012 10:21:31 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id C4BDB5E0141
	for <gpsd-dev@nongnu.org>; Wed, 22 Aug 2012 10:21:30 +0100 (IST)
Message-ID: <5034A4B2.8020706@techworks.ie>
Date: Wed, 22 Aug 2012 10:21:54 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
References: <1T464a-1IGuAq0@fwd53.aul.t-online.de>
In-Reply-To: <1T464a-1IGuAq0@fwd53.aul.t-online.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: Re: [gpsd-dev] Scaled AIS JSON messages...
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 09:21:48 -0000

On 22/08/12 09:13, Reinhard.Arlt@t-online.de wrote:
> Hello,

Hi Reinhard,

>
> as much as i understand, the course in the gpsd ais type 1 message is
> scaled by ten, but the heading is not.

Correct.

>
> During test with the nmea2000 ais decoder, i see no difference for
> the course value, it is scaled by ten regardless if scaled is true a
> false.

You are right, in scaled mode the course is not scaled. This is a 
mistake in gpsd_json.c.

> Should i insert the course value also only as a number between 0 and
> 359?

No, you should fill the structure with the raw course value (scaled by ten).


Chris

>
> Thank you
>
> Reinhard
>
>
>
>


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Wed Aug 22 05:43:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T47TP-0007em-1W
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 05:43:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55922)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T47TG-0007eS-No
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 05:43:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T47TC-0005RI-P5
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 05:43:30 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:53575)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T47TC-0005R9-IG
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 05:43:26 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id EB1FE5E1CCA
	for <gpsd-dev@nongnu.org>; Wed, 22 Aug 2012 10:43:24 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id hYGUsEGcwdCt for <gpsd-dev@nongnu.org>;
	Wed, 22 Aug 2012 10:43:19 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 8E5875E0141
	for <gpsd-dev@nongnu.org>; Wed, 22 Aug 2012 10:43:19 +0100 (IST)
Message-ID: <5034A9CE.1060900@techworks.ie>
Date: Wed, 22 Aug 2012 10:43:42 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
References: <1T464a-1IGuAq0@fwd53.aul.t-online.de>
	<5034A4B2.8020706@techworks.ie>
In-Reply-To: <5034A4B2.8020706@techworks.ie>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: Re: [gpsd-dev] Scaled AIS JSON messages...
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 09:43:37 -0000

On 22/08/12 10:21, Christian Gagneraud wrote:
> On 22/08/12 09:13, Reinhard.Arlt@t-online.de wrote:
>> Hello,
>
> Hi Reinhard,
>
>>
>> as much as i understand, the course in the gpsd ais type 1 message is
>> scaled by ten, but the heading is not.
>
> Correct.
>
>>
>> During test with the nmea2000 ais decoder, i see no difference for
>> the course value, it is scaled by ten regardless if scaled is true a
>> false.
>
> You are right, in scaled mode the course is not scaled. This is a
> mistake in gpsd_json.c.
>
>> Should i insert the course value also only as a number between 0 and
>> 359?
>
> No, you should fill the structure with the raw course value (scaled by
> ten).

I just had a quick look at your code in driver_nmea.c, and I noticed 
that you're filling the AIS structure with double values. This is wrong 
you should fill the structure with raw (unscaled, integer) values.
If you need help, let me know, i'll be happy to contribute.

Chris

>
>
> Chris
>
>>
>> Thank you
>>
>> Reinhard
>>
>>
>>
>>
>
>


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Wed Aug 22 07:56:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T49Xn-00021a-Eb
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 07:56:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57434)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T49Xg-00021U-Nl
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 07:56:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T49Xc-0004IB-HA
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 07:56:12 -0400
Received: from mailx.techworks.ie ([88.198.36.49]:45560)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <chris@techworks.ie>) id 1T49Xc-0004I2-B8
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 07:56:08 -0400
Received: from localhost (localhost [127.0.0.1])
	by mailx.techworks.ie (Postfix) with ESMTP id C4E755E1CED
	for <gpsd-dev@nongnu.org>; Wed, 22 Aug 2012 12:56:06 +0100 (IST)
X-Virus-Scanned: amavisd-new at techworks.ie
Received: from mailx.techworks.ie ([127.0.0.1])
	by localhost (mailx.techworks.ie [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id u9P3hnE8vHAF for <gpsd-dev@nongnu.org>;
	Wed, 22 Aug 2012 12:56:01 +0100 (IST)
Received: from [192.168.5.183] (unknown [86.43.120.173])
	by mailx.techworks.ie (Postfix) with ESMTPSA id 87B5E5E1B9F
	for <gpsd-dev@nongnu.org>; Wed, 22 Aug 2012 12:56:01 +0100 (IST)
Message-ID: <5034C8E9.1090003@techworks.ie>
Date: Wed, 22 Aug 2012 12:56:25 +0100
From: Christian Gagneraud <chris@techworks.ie>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
References: <1T3aqa-17nfhg0@fwd23.aul.t-online.de>
	<20120821155542.GA21208@thyrsus.com>
In-Reply-To: <20120821155542.GA21208@thyrsus.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 88.198.36.49
Subject: Re: [gpsd-dev] Can not push to git.sv.gnu.org
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 11:56:18 -0000

On 21/08/12 16:55, Eric S. Raymond wrote:
> Reinhard.Arlt@t-online.de <Reinhard.Arlt@t-online.de>:
>> 	git push fails (for me) since yesterday.
>
> I'm seeing the same issue.  I think it's a problem with ciabot.  I'll
> investigate.

I'm having problems here as well:

gpsd> git push
fatal: The remote end hung up unexpectedly

Chris

>


-- 
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/


From MAILER-DAEMON Wed Aug 22 08:04:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T49fo-00005n-HS
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 08:04:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46846)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T49fd-00005X-U5
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 08:04:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T49fY-0006fe-2S
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 08:04:25 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:57794 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T49fX-0006fV-Ue
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 08:04:19 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id E3333420EF; Wed, 22 Aug 2012 08:03:49 -0400 (EDT)
Date: Wed, 22 Aug 2012 08:03:49 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120822120348.GA31522@thyrsus.com>
References: <1T3aqa-17nfhg0@fwd23.aul.t-online.de>
	<20120821155542.GA21208@thyrsus.com>
	<5034C8E9.1090003@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5034C8E9.1090003@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Can not push to git.sv.gnu.org
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 12:04:35 -0000

Christian Gagneraud <chris@techworks.ie>:
> On 21/08/12 16:55, Eric S. Raymond wrote:
> >Reinhard.Arlt@t-online.de <Reinhard.Arlt@t-online.de>:
> >>	git push fails (for me) since yesterday.
> >
> >I'm seeing the same issue.  I think it's a problem with ciabot.  I'll
> >investigate.
> 
> I'm having problems here as well:
> 
> gpsd> git push
> fatal: The remote end hung up unexpectedly

Should be fixed now.  We had to disable the ciabot hook script, which broke 
because the server address was changed.

I happen to be the maintainer of that script.  I've fixed it to fail more
gracefully if the address ever changes again, and shipped the patch to
the git folks.

Commit notifications will not resume being visible on #gpsd until the
new version is installed on Savannah. I've mailed the admin a copy.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Wed Aug 22 09:27:46 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4AyH-0007hN-Vp
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 09:27:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43425)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T4AyC-0007hF-7P
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 09:27:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T4Ay7-0001EI-9G
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 09:27:39 -0400
Received: from mailout05.t-online.de ([194.25.134.82]:37984)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Reinhard.Arlt@t-online.de>) id 1T4Ay6-0001ED-Vv
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 09:27:35 -0400
Received: from fwd01.aul.t-online.de (fwd01.aul.t-online.de )
	by mailout05.t-online.de with smtp 
	id 1T4Ay4-00033q-Fl; Wed, 22 Aug 2012 15:27:32 +0200
Received: from localhost
	(GEB3SkZVghgrlOGTKR4oCkl7CUS4jbozZIA7AoblNQGwrxx8dAIrC9U-hmqQRIRw+i@[172.20.101.250])
	by fwd01.aul.t-online.de
	with esmtp id 1T4Axs-1e9fU00; Wed, 22 Aug 2012 15:27:20 +0200
MIME-Version: 1.0
Received: from 89.183.32.140:60157 by cmpweb31.aul.t-online.de with HTTP/1.1
	(NGCS V4-0-7-0 on API V3-11-14-0)
In-Reply-To: <5034A9CE.1060900@techworks.ie>
References: <5034A9CE.1060900@techworks.ie>
Date: Wed, 22 Aug 2012 15:27:20 +0200
To: "Christian Gagneraud" <chris@techworks.ie>, gpsd-dev@nongnu.org
X-Priority: 3
X-UMS: email
X-Mailer: DTAG NGCS V4-0-7-0
From: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
Content-Type: multipart/alternative;
	boundary="=_707a15c6a2827bbce979a919633d1ac5"
Message-ID: <1T4Axs-1e9fU00@fwd01.aul.t-online.de>
X-ID: GEB3SkZVghgrlOGTKR4oCkl7CUS4jbozZIA7AoblNQGwrxx8dAIrC9U-hmqQRIRw+i@t-dialin.net
X-TOI-MSGID: 41dc8058-e0e9-42a1-aba6-8f4e4966505b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 194.25.134.82
Subject: Re: [gpsd-dev] =?utf-8?q?Scaled_AIS_JSON_messages=2E=2E=2E?=
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: "Reinhard.Arlt@t-online.de" <Reinhard.Arlt@t-online.de>
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 13:27:44 -0000

--=_707a15c6a2827bbce979a919633d1ac5
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Hallo, 

	i hopefully scale them from the nmea2000 to the AIS scale. 

	The conversion from double to int should be a job of the compiler. 

	The JSON output of gpsd seems to be correct, and i have no idea at
the moment, how to handle the AIS special values. 

	But i push this version as soon as possible, so that we have a base
for a discussion. 

	I think, the nmea2000 people had to decide, to be consistent with
their own scale factors in the other messages, or switch for AIS to
the AIS factors. 

	Reinhard 

	-----Original-Nachricht----- 

	Von: Christian Gagneraud <chris@techworks.ie> 

	An: gpsd-dev@nongnu.org 

	Betreff: Re: [gpsd-dev] Scaled AIS JSON messages... 

	Datum: Wed, 22 Aug 2012 11:43:42 +0200 

	On 22/08/12 10:21, Christian Gagneraud wrote: 

	> On 22/08/12 09:13, Reinhard.Arlt@t-online.de wrote: 

	>> Hello, 

	> 

	> Hi Reinhard, 

	> 

	>> 

	>> as much as i understand, the course in the gpsd ais type 1 message
is 

	>> scaled by ten, but the heading is not. 

	> 

	> Correct. 

	> 

	>> 

	>> During test with the nmea2000 ais decoder, i see no difference for


	>> the course value, it is scaled by ten regardless if scaled is true
a 

	>> false. 

	> 

	> You are right, in scaled mode the course is not scaled. This is a 

	> mistake in gpsd_json.c. 

	> 

	>> Should i insert the course value also only as a number between 0
and 

	>> 359? 

	> 

	> No, you should fill the structure with the raw course value (scaled
by 

	> ten). 

	I just had a quick look at your code in driver_nmea.c, and I noticed 

	that you're filling the AIS structure with double values. This is
wrong 

	you should fill the structure with raw (unscaled, integer) values. 

	If you need help, let me know, i'll be happy to contribute. 

	Chris 

	> 

	> 

	> Chris 

	> 

	>> 

	>> Thank you 

	>> 

	>> Reinhard 

	>> 

	>> 

	>> 

	>> 

	> 

	> 

	-- 

	Christian Gagneraud, 

	Embedded systems engineer. 

	Techworks Marine 

	1 Harbour road 

	Dun Laoghaire 

	Co. Dublin 

	Ireland 

	Tel: + 353 (0) 1 236 5990 

	Web: http://www.techworks.ie/
--=_707a15c6a2827bbce979a919633d1ac5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html><head><title></title><meta http-equiv=3D"Content-Type" content=3D"tex=
t/html; charset=3DUTF-8"/></head><body><p style=3D"margin: 0px;">Hallo,</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">i hopefully scale them from the nmea2000 to the A=
IS scale.</p>
<p style=3D"margin: 0px;">The conversion from double to int should be a job=
 of the compiler.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">The JSON output of gpsd seems to be correct, and =
i have no idea at the moment, how to handle the AIS special values.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">But i push this version as soon as possible, so t=
hat we have a base for a discussion.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">I think, the nmea2000 people had to decide, to be=
 consistent with their own&nbsp;scale factors in the other messages, or swi=
tch for AIS to the AIS factors.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Reinhard</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">-----Original-Nachricht-----</p>
<p style=3D"margin: 0px;">Von: Christian Gagneraud &lt;chris@techworks.ie&g=
t;</p>
<p style=3D"margin: 0px;">An: gpsd-dev@nongnu.org</p>
<p style=3D"margin: 0px;">Betreff: Re: [gpsd-dev] Scaled AIS JSON messages.=
..</p>
<p style=3D"margin: 0px;">Datum: Wed, 22 Aug 2012 11:43:42 +0200</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">On 22/08/12 10:21, Christian Gagneraud wrote:</p>
<p style=3D"margin: 0px;">&gt; On 22/08/12 09:13, Reinhard.Arlt@t-online.de=
 wrote:</p>
<p style=3D"margin: 0px;">&gt;&gt; Hello,</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt; Hi Reinhard,</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt; as much as i understand, the course in t=
he gpsd ais type 1 message is</p>
<p style=3D"margin: 0px;">&gt;&gt; scaled by ten, but the heading is not.</=
p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt; Correct.</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt; During test with the nmea2000 ais decode=
r, i see no difference for</p>
<p style=3D"margin: 0px;">&gt;&gt; the course value, it is scaled by ten re=
gardless if scaled is true a</p>
<p style=3D"margin: 0px;">&gt;&gt; false.</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt; You are right, in scaled mode the course is =
not scaled. This is a</p>
<p style=3D"margin: 0px;">&gt; mistake in gpsd_json.c.</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt; Should i insert the course value also on=
ly as a number between 0 and</p>
<p style=3D"margin: 0px;">&gt;&gt; 359?</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt; No, you should fill the structure with the r=
aw course value (scaled by</p>
<p style=3D"margin: 0px;">&gt; ten).</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">I just had a quick look at your code in driver_nm=
ea.c, and I noticed</p>
<p style=3D"margin: 0px;">that you're filling the AIS structure with double=
 values. This is wrong</p>
<p style=3D"margin: 0px;">you should fill the structure with raw (unscaled,=
 integer) values.</p>
<p style=3D"margin: 0px;">If you need help, let me know, i'll be happy to c=
ontribute.</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">Chris</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt; Chris</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt; Thank you</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt; Reinhard</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;&gt;</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&gt;</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">--</p>
<p style=3D"margin: 0px;">Christian Gagneraud,</p>
<p style=3D"margin: 0px;">Embedded systems engineer.</p>
<p style=3D"margin: 0px;">Techworks Marine</p>
<p style=3D"margin: 0px;">1 Harbour road</p>
<p style=3D"margin: 0px;">Dun Laoghaire</p>
<p style=3D"margin: 0px;">Co. Dublin</p>
<p style=3D"margin: 0px;">Ireland</p>
<p style=3D"margin: 0px;">Tel: + 353 (0) 1 236 5990</p>
<p style=3D"margin: 0px;">Web: http://www.techworks.ie/</p>
<p style=3D"margin: 0px;">&nbsp;</p>
<p style=3D"margin: 0px;">&nbsp;</p></body></html>
--=_707a15c6a2827bbce979a919633d1ac5--




From MAILER-DAEMON Wed Aug 22 14:00:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T4FDx-0004GJ-2u
	for mharc-gpsd-dev@gnu.org; Wed, 22 Aug 2012 14:00:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:32942)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T4FDp-0004CF-UV
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 14:00:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T4FDl-0007Fn-1r
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 14:00:05 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:59909 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T4FDk-0007FW-Tv
	for gpsd-dev@nongnu.org; Wed, 22 Aug 2012 14:00:00 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 64BDE420F1; Wed, 22 Aug 2012 13:59:29 -0400 (EDT)
Date: Wed, 22 Aug 2012 13:59:29 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Christian Gagneraud <chris@techworks.ie>
Message-ID: <20120822175929.GA7945@thyrsus.com>
References: <1T464a-1IGuAq0@fwd53.aul.t-online.de>
	<5034A4B2.8020706@techworks.ie>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5034A4B2.8020706@techworks.ie>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] Scaled AIS JSON messages...
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Aug 2012 18:00:11 -0000

Christian Gagneraud <chris@techworks.ie>:
> You are right, in scaled mode the course is not scaled. This is a
> mistake in gpsd_json.c.

Now fixed.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Aug 28 06:08:05 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6IiL-0003yI-SY
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 06:08:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50197)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@ntp.org>) id 1T6IiJ-0003yB-Nj
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 06:08:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@ntp.org>) id 1T6IiD-0006C4-N6
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 06:08:03 -0400
Received: from stenn.ntp.org ([149.20.68.30]:36481)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@ntp.org>) id 1T6IiD-0006BL-HQ
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 06:07:57 -0400
Received: from localhost.ntp.org ([::1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.80 (FreeBSD))
	(envelope-from <stenn@ntp.org>)
	id 1T6Ii7-000FzG-40; Tue, 28 Aug 2012 03:07:51 -0700
To: gpsd-dev@nongnu.org
From: Harlan Stenn <stenn@ntp.org>
X-Face: "csXK}xnnsH\h_ce`T#|pM]tG,
	6Xu.{3Rb\]&XJgVyTS'w{E+|-(}n<m88'RZQA.<2]zo&R
	I8nHuPumSNjsAN&WGhll?v}1#%)~2%QI~4Vs%IuWb#OmZmKck_1Ee&C\k&vJ}BWx:Bb#Mx8>:c(Cc*
	$cbtusxDP6T)Hr'k&zrwq0.3&~bAI~YJco[r.mE+K|(q]F=ZNXug:s6tyOk{VTqARy0#axm6BWti9C
	d
X-Mailer: MH-E 7.4.2; nmh 1.4; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Tue, 28 Aug 2012 03:07:51 -0700
Message-Id: <E1T6Ii7-000FzG-40@stenn.ntp.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.30
Subject: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 10:08:05 -0000

Folks,

We're looking to improve NTP's SHM refclock interface.

I expect we will keep modes 0 and 1 the same (bit 0), and use bit 1 to
indicate that the base units will be nanoseconds instead of
microseconds.

Similarly, I expect we'll use a union of two structures, the original
struct shmTime (or make a subset of that structure the union) and the
new layout; the 'mode' value will be in the same place in the structure.

http://support.ntp.org/bin/view/Support/ImprovingTheSHMRefclock is where
we're tracking this work.  If you have any ideas or comments, please
submit them there.

-- 
Harlan Stenn <stenn@ntp.org>
http://networktimefoundation.org  - be a member!


From MAILER-DAEMON Tue Aug 28 15:01:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6R2u-0001Y5-0M
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 15:01:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35289)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6R2r-0001U0-QM
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 15:01:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6R2q-0007tC-Ks
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 15:01:49 -0400
Received: from catbert.rellim.com ([204.17.205.1]:51123)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6R2q-0007pu-8P
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 15:01:48 -0400
Received: from localhost (spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q7SJ1X6f003430
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Tue, 28 Aug 2012 12:01:34 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q7SJ1X6f003430
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1346180494; bh=Z8qr0b2WyTmo/NfVE/X6vZrLFI06pGynnJNml5yL0XM=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	Mime-Version:Content-Type;
	b=JcNoFUAa5Wif/n63FcoVjvxDp9Lfu6JcilBwi1ILRJszYVgP+xUm279X5WeW9lAER
	rdrHoOqv/rlCDO+8FD/cA==
Date: Tue, 28 Aug 2012 12:01:32 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: Harlan Stenn <stenn@ntp.org>
Message-ID: <20120828120132.0e589330.gem@rellim.com>
In-Reply-To: <E1T6Ii7-000FzG-40@stenn.ntp.org>
References: <E1T6Ii7-000FzG-40@stenn.ntp.org>
Organization: Rellim
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/HLFd+omytK+Y9xw=.u.MUd7";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 19:01:50 -0000

--Sig_/HLFd+omytK+Y9xw=.u.MUd7
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo Harlan!

On Tue, 28 Aug 2012 03:07:51 -0700
Harlan Stenn <stenn@ntp.org> wrote:

> I expect we will keep modes 0 and 1 the same (bit 0), and use bit 1 to
> indicate that the base units will be nanoseconds instead of
> microseconds.

Great news.  Let us know when there is something to test.

How will we be able to know if an ntpd is capable of the new SHM mode??

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
	gem@rellim.com  Tel:+1(541)382-8588

--Sig_/HLFd+omytK+Y9xw=.u.MUd7
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlA9FY0ACgkQBmnRqz71OvM2XQCgs/mwkkzZ+wyG3qTATDIJQksu
CzUAn1268Lc6QLoxc43YhMtKT/gmqrC/
=UOvp
-----END PGP SIGNATURE-----

--Sig_/HLFd+omytK+Y9xw=.u.MUd7--


From MAILER-DAEMON Tue Aug 28 16:56:24 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Spk-0007bB-Ub
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 16:56:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49247)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6Spi-0007YH-J0
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 16:56:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6Sph-0002tF-Hx
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 16:56:22 -0400
Received: from stenn.ntp.org ([149.20.68.30]:46433)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6Sph-0002sm-CH
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 16:56:21 -0400
Received: from localhost.ntp.org ([::1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.80 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1T6Spa-000GTW-8v; Tue, 28 Aug 2012 13:56:14 -0700
To: "Gary E. Miller" <gem@rellim.com>
In-reply-to: <20120828120132.0e589330.gem@rellim.com>
References: <E1T6Ii7-000FzG-40@stenn.ntp.org>
	<20120828120132.0e589330.gem@rellim.com>
Comments: In-reply-to "Gary E. Miller" <gem@rellim.com>
	message dated "Tue, 28 Aug 2012 12:01:32 -0700."
X-Mailer: MH-E 7.4.2; nmh 1.4; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Tue, 28 Aug 2012 13:56:14 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1T6Spa-000GTW-8v@stenn.ntp.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.30
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 20:56:23 -0000

"Gary E. Miller" writes:
> Yo Harlan!

Yo!

> On Tue, 28 Aug 2012 03:07:51 -0700
> Harlan Stenn <stenn@ntp.org> wrote:
> 
> > I expect we will keep modes 0 and 1 the same (bit 0), and use bit 1 to
> > indicate that the base units will be nanoseconds instead of
> > microseconds.
> 
> Great news.  Let us know when there is something to test.
> 
> How will we be able to know if an ntpd is capable of the new SHM mode??

Are you sure you only want what I think of?

Please do visit http://support.ntp.org/bin/view/Support/ImprovingTheSHMRefclock
and comment.

H


From MAILER-DAEMON Tue Aug 28 18:02:01 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6TrF-00079D-Le
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 18:02:01 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48612)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1T6TrD-00071h-2m
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 18:02:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1T6TrC-0005zg-4g
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 18:01:58 -0400
Received: from ip-64-139-1-69.sjc.megapath.net ([64.139.1.69]:53939)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1T6TrB-0005zV-93
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 18:01:58 -0400
Received: from shuksan (localhost [127.0.0.1])
	by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id 908F280006F; 
	Tue, 28 Aug 2012 15:01:51 -0700 (PDT)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: Harlan Stenn <stenn@ntp.org>, "Gary E. Miller" <gem@rellim.com>
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from "Gary E. Miller" <gem@rellim.com> of "Tue,
	28 Aug 2012 12:01:32 PDT." <20120828120132.0e589330.gem@rellim.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 28 Aug 2012 15:01:51 -0700
Message-Id: <20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 64.139.1.69
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 22:02:00 -0000

> How will we be able to know if an ntpd is capable of the new SHM mode??

That's a key question.  I don't have any great ideas.

Plan one is to release a new ntpd that handles the new mode, wait for it to 
get widely distributed, then release a new gpsd that takes advantage of it.  
That's likely to take a long time.

The "wait" could be reduced if ntpd and gpsd could get coordinated on handing 
new releases to the upstream distributions.

We could use 2 chunks of shared memory.  gpsd writes to both, ntpd uses a 
mode bit or tries both.

If we do that, the new format should probably include some way of 
communicating what versions are supported so we don't have to do this dance 
again.

------------

Back to the original problem:

stenn@ntp.org said:
> We're looking to improve NTP's SHM refclock interface.

I looked carefully at this stuff several years ago and I couldn't convince 
myself that it would actually work correctly.  I forget the details.  I may 
be able to reconstruct something.  This stuff is tricky.  The details 
probably depend upon the machine architecture.

A year or 2 ago, there was a proposal to do-it-clean and use pthreads 
locking.  I think the discussion was on usenet.  That's a nice idea, but I 
don't know how to write the code for this case.  Does pthreads support 
locking when memory is shared between jobs rather than different threads or 
forks in the same job?  The problem is who does the initialization?  We don't 
know which side gets started first.  What happens if one side crashes and 
restarts?  There should be a FAQ that covers this, if only to say "don't do 
it".


I used to work with people who were wizards at this stuff.  I asked one of 
them how to do it.  His suggestion is roughly:

The shared memory uses 2 variables to control locking.  Call them X and Y.

The writer bumps X, updates the data, then sets Y to X.

The reader grabs Y, grabs the data, then grabs X.
If X != Y, the data is invalid.
(The reader should ignore the first valid data in case it's left over from 
ages ago or initial memory was zeroed or ....)

The key is that the writer updates X then Y while the reader reads them in 
the opposite order.

Note that the reader never writes to shared memory and the writer never reads 
anything.  That allows multiple readers.

X and Y need to be sized so they are atomically updatable.  The code also 
needs cache flushes in the right places.  I think a cache flush is a no-op on 
x86.  I think it needs real code on ARM and others.  There should be a FAQ on 
this, but I didn't find it with a quick search.




-- 
These are my opinions.  I hate spam.





From MAILER-DAEMON Tue Aug 28 18:52:14 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Udp-0008DV-WF
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 18:52:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49707)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6Udn-0008DF-A2
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 18:52:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6Udl-0004dD-08
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 18:52:11 -0400
Received: from catbert.rellim.com ([204.17.205.1]:52769)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6Udk-0004cu-KC
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 18:52:08 -0400
Received: from localhost (spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q7SMpw6h018156
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Tue, 28 Aug 2012 15:51:59 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q7SMpw6h018156
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1346194319; bh=/7j6y6AJYpXHn6yCy9pAFPR6x379+qqIAUdgi386xP8=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	Mime-Version:Content-Type;
	b=lpD+W/vB0tZnypr4NY9niQEICUSH5RTk3eJ/KLWUCprdwCdnDsWQ0ktcZ7FP5fPsj
	G6J776bMnXt6UgWYn5rjg==
Date: Tue, 28 Aug 2012 15:51:58 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: Hal Murray <hmurray@megapathdsl.net>
Message-ID: <20120828155158.6007e2c3.gem@rellim.com>
In-Reply-To: <20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
References: <20120828120132.0e589330.gem@rellim.com>
	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
Organization: Rellim
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/kyvM_luVLdg8uaULeSGx.sx";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 22:52:12 -0000

--Sig_/kyvM_luVLdg8uaULeSGx.sx
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo Hal!

On Tue, 28 Aug 2012 15:01:51 -0700
Hal Murray <hmurray@megapathdsl.net> wrote:

> > How will we be able to know if an ntpd is capable of the new SHM
> > mode??
>=20
> Plan one is to release a new ntpd that handles the new mode, wait for
> it to get widely distributed, then release a new gpsd that takes
> advantage of it. That's likely to take a long time.

gpsd is still fighting with major distros not updated to gpsd 3.x yet.
Should be simple to come up with a simple way to determine protocol
version.

> We could use 2 chunks of shared memory.  gpsd writes to both, ntpd
> uses a mode bit or tries both.

That could work.  Or what about the pipe protocol that gpsd uses with
chronyd?

> Back to the original problem:
>=20
> stenn@ntp.org said:
> > We're looking to improve NTP's SHM refclock interface.
>=20
> I looked carefully at this stuff several years ago and I couldn't
> convince myself that it would actually work correctly.  I forget the
> details.  I may be able to reconstruct something.  This stuff is
> tricky.  The details probably depend upon the machine architecture.

Yes, and trying to get gcc to not optimize out, and properly fence, the
SHM access is a bitch.

> A year or 2 ago, there was a proposal to do-it-clean and use pthreads=20
> locking.  I think the discussion was on usenet.  That's a nice idea,
> but I don't know how to write the code for this case.  Does pthreads
> support locking when memory is shared between jobs rather than
> different threads or forks in the same job?  The problem is who does
> the initialization?  We don't know which side gets started first.
> What happens if one side crashes and restarts?  There should be a FAQ
> that covers this, if only to say "don't do it".

Threads are so controversial and non-portable I would prefer not to
touch that idea.

> I used to work with people who were wizards at this stuff.  I asked
> one of them how to do it.  His suggestion is roughly:

[...]

> X and Y need to be sized so they are atomically updatable.  The code
> also needs cache flushes in the right places.  I think a cache flush
> is a no-op on x86.  I think it needs real code on ARM and others.
> There should be a FAQ on this, but I didn't find it with a quick
> search.

Yup.  Every CPU is different.  Even CPUs in the same family vary in
how to get atomics right.  C compilers, if they give any support at all,=20
use hackish ways to get it right.

So, any reason NOT to go to named pipes like chronyd?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
	gem@rellim.com  Tel:+1(541)382-8588

--Sig_/kyvM_luVLdg8uaULeSGx.sx
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlA9S44ACgkQBmnRqz71OvPuwQCfXqId7ZCme0S27k7BoWwYTfNX
gOYAoMs0sqlOVDTEX19IS3jHfP29j+br
=uEco
-----END PGP SIGNATURE-----

--Sig_/kyvM_luVLdg8uaULeSGx.sx--


From MAILER-DAEMON Tue Aug 28 19:08:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Utf-0001UO-0U
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 19:08:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35790)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6Utd-0001T7-B5
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:08:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6Utb-0000o5-KU
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:08:33 -0400
Received: from stenn.ntp.org ([149.20.68.30]:22748)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6Utb-0000ny-FQ
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:08:31 -0400
Received: from localhost.ntp.org ([::1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.80 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1T6UtX-000Gb5-PP; Tue, 28 Aug 2012 16:08:27 -0700
To: "Gary E. Miller" <gem@rellim.com>
In-reply-to: <20120828155158.6007e2c3.gem@rellim.com>
References: <20120828120132.0e589330.gem@rellim.com>
	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
	<20120828155158.6007e2c3.gem@rellim.com>
Comments: In-reply-to "Gary E. Miller" <gem@rellim.com>
	message dated "Tue, 28 Aug 2012 15:51:58 -0700."
X-Mailer: MH-E 7.4.2; nmh 1.4; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Tue, 28 Aug 2012 16:08:27 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1T6UtX-000Gb5-PP@stenn.ntp.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.30
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 23:08:34 -0000

"Gary E. Miller" writes:
> On Tue, 28 Aug 2012 15:01:51 -0700
> Hal Murray <hmurray@megapathdsl.net> wrote:
> > stenn@ntp.org said:
> > > We're looking to improve NTP's SHM refclock interface.
> >=20
> > I looked carefully at this stuff several years ago and I couldn't
> > convince myself that it would actually work correctly.  I forget the
> > details.  I may be able to reconstruct something.  This stuff is
> > tricky.  The details probably depend upon the machine architecture.
> 
> Yes, and trying to get gcc to not optimize out, and properly fence, the
> SHM access is a bitch.

I don't know if 'volatile' will help there or not.

I used to do a *lot* of work with SYSVIPC, including SHM, SEM, and the
message queue stuff.  Yeah, it's miserable and it doesn't get any easier
as compilers "go deeper" or as stages along the way sometimes aren't
done right.

> > A year or 2 ago, there was a proposal to do-it-clean and use pthreads=20
> > locking.  I think the discussion was on usenet.  That's a nice idea,
> > but I don't know how to write the code for this case.  Does pthreads
> > support locking when memory is shared between jobs rather than
> > different threads or forks in the same job?  The problem is who does
> > the initialization?  We don't know which side gets started first.
> > What happens if one side crashes and restarts?  There should be a FAQ
> > that covers this, if only to say "don't do it".
> 
> Threads are so controversial and non-portable I would prefer not to
> touch that idea.

I'm in that same camp too, and I'm hearing from folks I trust that
things are much better now.

It wasn't all that long ago that NTP dropped support for K&R C.  We
still haven't officially said if we require C89 or C99, but since I
believe some C99 stuff has snuck in and nobody has complained...

This also gets a lot easier now that "let's use this ancient hardware"
now means an x86 box that can run a number of current free OSes, as
opposed to some much older hardware that runs a proprietary OS and it is
a PITA to get a newer C compiler on it.

> > I used to work with people who were wizards at this stuff.  I asked
> > one of them how to do it.  His suggestion is roughly:
> 
> [...]
> 
> > X and Y need to be sized so they are atomically updatable.  The code
> > also needs cache flushes in the right places.  I think a cache flush
> > is a no-op on x86.  I think it needs real code on ARM and others.
> > There should be a FAQ on this, but I didn't find it with a quick
> > search.
> 
> Yup.  Every CPU is different.  Even CPUs in the same family vary in
> how to get atomics right.  C compilers, if they give any support at all,=20
> use hackish ways to get it right.
> 
> So, any reason NOT to go to named pipes like chronyd?

NTP would need non-GPL'd code, and if this was to happen for 4.2.8 it
would need to be non-blocking.  It would also have to happen very soon.

H


From MAILER-DAEMON Tue Aug 28 19:31:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6VGJ-0004Kl-GU
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 19:31:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50719)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6VGG-0004KE-Lz
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:31:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6VGF-000814-Fk
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:31:56 -0400
Received: from catbert.rellim.com ([204.17.205.1]:60355)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6VGF-00080j-3c
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:31:55 -0400
Received: from localhost (spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q7SNVofL019607
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Tue, 28 Aug 2012 16:31:51 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q7SNVofL019607
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1346196711; bh=8fXvtIfGvtCXA2aVStO0KQ17bWDsbhVZK5nHvfWvFc0=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	Mime-Version:Content-Type;
	b=QD76X4kiXSxx4M7bW78XkU0Xdv6gd5vU3v3cs4JdThHCqFSUez32Tb2iJaBWE/4oI
	HCKH2KnvyHCmaxGy4yt4g==
Date: Tue, 28 Aug 2012 16:31:49 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: Harlan Stenn <stenn@ntp.org>
Message-ID: <20120828163149.762fae2e.gem@rellim.com>
In-Reply-To: <E1T6UtX-000Gb5-PP@stenn.ntp.org>
References: <20120828120132.0e589330.gem@rellim.com>
	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
	<20120828155158.6007e2c3.gem@rellim.com>
	<E1T6UtX-000Gb5-PP@stenn.ntp.org>
Organization: Rellim
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/J0IkKLEGdCGE+iMKGGOULsb";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 23:31:58 -0000

--Sig_/J0IkKLEGdCGE+iMKGGOULsb
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo Harlan!

On Tue, 28 Aug 2012 16:08:27 -0700
Harlan Stenn <stenn@ntp.org> wrote:

> > Yes, and trying to get gcc to not optimize out, and properly fence,
> > the SHM access is a bitch.
>=20
> I don't know if 'volatile' will help there or not.

We have tried that, but still run into corner cases.

> I used to do a *lot* of work with SYSVIPC, including SHM, SEM, and the
> message queue stuff.  Yeah, it's miserable and it doesn't get any
> easier as compilers "go deeper" or as stages along the way sometimes
> aren't done right.

Yup.

> > Threads are so controversial and non-portable I would prefer not to
> > touch that idea.
>=20
> I'm in that same camp too, and I'm hearing from folks I trust that
> things are much better now.

Better, but I was just looking at the new ARM locking, ugh.

No need to grasb any code from the chronyc project, I just refreshed
my memory on how it works and it is pretty trivial.

Now that I look at the code they call it their SOCK interface.  The
chronyd side is in their file: refclock_sock.c.

Their whole driver source is only 132 lines and looks pretty simple.
OTOH, if you are being cautious about the license then maybe you should
not look at it. :-)

All they really do is:
	open the socket and bind to it
	a  main loop sitting in a select() waiting for input.
	If there is input they read a structure from it.

The structure mostly has the time stamp of the measurement and the
measured offset.  All the hard part of threading, volatile, etc.
is left where it belongs, in the kernel.


> NTP would need non-GPL'd code, and if this was to happen for 4.2.8 it
> would need to be non-blocking.  It would also have to happen very
> soon.

Since the gpsd support is already in production use, only the ntpd side
would need to be done and it would be simple.  I would be happy to assist
anyone that is comfy with adding ntpd refclocks.  Since it would be a
new refclock it would not need to be perfect as it would not break
any existing implementation.



RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
	gem@rellim.com  Tel:+1(541)382-8588

--Sig_/J0IkKLEGdCGE+iMKGGOULsb
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlA9VOUACgkQBmnRqz71OvNsSACgyabiX08+p5q6rsAw2begQgz3
DYMAnRRiOZDFcfFVe5UDr0sqWbyRmYa3
=pmqw
-----END PGP SIGNATURE-----

--Sig_/J0IkKLEGdCGE+iMKGGOULsb--


From MAILER-DAEMON Tue Aug 28 19:35:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6VJQ-0004hR-S7
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 19:35:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45809)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T6VJO-0004ga-To
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:35:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T6VJN-0000PT-N0
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:35:10 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:36940 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T6VJN-0000OA-Jd
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:35:09 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id E852740FDF; Tue, 28 Aug 2012 19:34:26 -0400 (EDT)
Date: Tue, 28 Aug 2012 19:34:26 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Hal Murray <hmurray@megapathdsl.net>
Message-ID: <20120828233426.GB26394@thyrsus.com>
References: <gem@rellim.com> <20120828120132.0e589330.gem@rellim.com>
	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 23:35:12 -0000

Hal Murray <hmurray@megapathdsl.net>:
> The key is that the writer updates X then Y while the reader reads them in 
> the opposite order.
> 
> Note that the reader never writes to shared memory and the writer never reads 
> anything.  That allows multiple readers.
> 
> X and Y need to be sized so they are atomically updatable.  The code also 
> needs cache flushes in the right places.  I think a cache flush is a no-op on 
> x86.  I think it needs real code on ARM and others.  There should be a FAQ on 
> this, but I didn't find it with a quick search.

Heh.  We actually use this very technique in *our* SHM interface.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Tue Aug 28 19:54:50 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6VcQ-0006xf-FD
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 19:54:50 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50455)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1T6VcN-0006v0-3y
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:54:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1T6VcL-0006X0-TQ
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:54:47 -0400
Received: from ip-64-139-1-69.sjc.megapath.net ([64.139.1.69]:55869)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <hmurray@megapathdsl.net>) id 1T6VcK-0006QG-UE
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 19:54:45 -0400
Received: from shuksan (localhost [127.0.0.1])
	by ip-64-139-1-69.sjc.megapath.net (Postfix) with ESMTP id A05B880006F; 
	Tue, 28 Aug 2012 16:54:39 -0700 (PDT)
X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3
To: "Gary E. Miller" <gem@rellim.com>
From: Hal Murray <hmurray@megapathdsl.net>
In-Reply-To: Message from "Gary E. Miller" <gem@rellim.com> of "Tue,
	28 Aug 2012 15:51:58 PDT." <20120828155158.6007e2c3.gem@rellim.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 28 Aug 2012 16:54:39 -0700
Message-Id: <20120828235439.A05B880006F@ip-64-139-1-69.sjc.megapath.net>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 64.139.1.69
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Aug 2012 23:54:48 -0000

> gpsd is still fighting with major distros not updated to gpsd 3.x yet.

Sigh.


> Should be simple to come up with a simple way to determine protocol version.

Why should that be simple?  It's the same problem as passing time-stamps from 
gpsd to ntpd, maybe even more complicated since you might want to go both 
directions.

----------

> So, any reason NOT to go to named pipes like chronyd?

It's certainly worth considering.

Is the API stable?  Is there any documentation?

I haven't used pipes for anything tricky like this.  Is there a good FAQ?

Basically, ntpd is single threaded, no locks, driver code can't block.

ntpd has 2 modes for IO.

One is polled: the system calls each driver once a second.  This is what the 
SHM driver does.

The other is a giant select: the system calls the right chunk of code when 
there is data to read.  Unless I've missed something, this mode doesn't know 
how to reopen devices that get closed.  So if you trip over your USB cable, 
that slot is dead until you restart ntpd.  I assume restarting gpsd would 
have the same problem if we used it this way.

I think we could do it all with polling.  That's assuming open doesn't block. 
 Or somebody could fix ntpd to reopen dead devices.  That would be handy for 
other cases.

---------


> Threads are so controversial and non-portable I would prefer not to touch
> that idea. 

What's the problem with threads?  I grew up with them (30+ years ago) so I 
never had any serious troubles.

Is the problem threads in general, or pthreads in particular?

I know of two general problem areas.  One is locks.  The other is 
who-calls-who?


-- 
These are my opinions.  I hate spam.





From MAILER-DAEMON Tue Aug 28 20:19:53 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6W0f-0000WJ-8I
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 20:19:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:35888)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dplatt@radagast.org>) id 1T6W0d-0000UF-6U
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 20:19:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dplatt@radagast.org>) id 1T6W0c-0006yN-4i
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 20:19:51 -0400
Received: from adsl-71-159-209-148.dsl.pltn13.sbcglobal.net
	([71.159.209.148]:40533 helo=radagast.org)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dplatt@radagast.org>) id 1T6W0b-0006xd-UB
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 20:19:50 -0400
Received: from [10.100.40.179] (host46.tivo.com [::ffff:204.176.49.46])
	(AUTH: PLAIN dplatt, TLS: TLSv1/SSLv3,256bits,AES256-SHA)
	by radagast.org with esmtp; Tue, 28 Aug 2012 16:39:42 -0700
	id 000EEDC9.503D56BE.00003288
Message-ID: <503D56BC.8070105@radagast.org>
Date: Tue, 28 Aug 2012 16:39:40 -0700
From: Dave Platt <dplatt@radagast.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.1.16) Gecko/20120724 Iceowl/1.0b1 Icedove/3.0.11
MIME-Version: 1.0
To: gpsd-dev@nongnu.org
References: <20120828120132.0e589330.gem@rellim.com>	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>	<20120828155158.6007e2c3.gem@rellim.com>	<E1T6UtX-000Gb5-PP@stenn.ntp.org>
	<20120828163149.762fae2e.gem@rellim.com>
In-Reply-To: <20120828163149.762fae2e.gem@rellim.com>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.159.209.148
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Aug 2012 00:19:52 -0000


>>> Yes, and trying to get gcc to not optimize out, and properly fence,
>>> the SHM access is a bitch.
>>
>> I don't know if 'volatile' will help there or not.
> 
> We have tried that, but still run into corner cases.

Yeah... "volatile" is the approach most people think of and try
(me included) but it's not designed as a synchronization primitive
and truly does not work reliably.

I have bloodied my nose on this issue repeatedly over the years...
most recently only a few months ago.

If you want mutual exclusion, you have to use primitives/APIs which
are specifically designed to provide mutual exclusion... and then
hurl rotten asparagus at any architecture/code designer who does not
implement them properly.  Same with atomicity... use primitives and APIs
designed for this purpose, and then harass the compiler/runtime providers
until they do them right.

With the right primitives and APIs, "volatile" is not necessary.  Without
them, "volatile" is not sufficient, and will certainly cause you heartburn
at 4 in the morning some day!

https://www.securecoding.cert.org/confluence/display/cplusplus/CON01-CPP.+Do+not+use+volatile+as+a+synchronization+primitive

https://www.securecoding.cert.org/confluence/display/seccode/CON00-C.+Avoid+race+conditions+with+multiple+threads



From MAILER-DAEMON Tue Aug 28 20:41:17 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6WLN-0002d8-OE
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 20:41:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57718)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6WLL-0002c4-Bb
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 20:41:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6WLK-0005md-1L
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 20:41:15 -0400
Received: from stenn.ntp.org ([149.20.68.30]:40378)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stenn@stenn.ntp.org>) id 1T6WLJ-0005mR-RV
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 20:41:13 -0400
Received: from localhost.ntp.org ([::1] helo=stenn.ntp.org)
	by stenn.ntp.org with esmtp (Exim 4.80 (FreeBSD))
	(envelope-from <stenn@stenn.ntp.org>)
	id 1T6WLI-000Ggy-Jr; Tue, 28 Aug 2012 17:41:12 -0700
To: Dave Platt <dplatt@radagast.org>
In-reply-to: <503D56BC.8070105@radagast.org>
References: <20120828120132.0e589330.gem@rellim.com>
	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
	<20120828155158.6007e2c3.gem@rellim.com>
	<E1T6UtX-000Gb5-PP@stenn.ntp.org>
	<20120828163149.762fae2e.gem@rellim.com>
	<503D56BC.8070105@radagast.org>
Comments: In-reply-to Dave Platt <dplatt@radagast.org>
	message dated "Tue, 28 Aug 2012 16:39:40 -0700."
X-Mailer: MH-E 7.4.2; nmh 1.4; XEmacs 21.4 (patch 22)
Mime-Version: 1.0 (generated by tm-edit 1.8)
Content-Type: text/plain; charset=US-ASCII
Date: Tue, 28 Aug 2012 17:41:12 -0700
From: Harlan Stenn <stenn@ntp.org>
Message-Id: <E1T6WLI-000Ggy-Jr@stenn.ntp.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 149.20.68.30
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Aug 2012 00:41:16 -0000

Dave Platt writes:
>>>> Yes, and trying to get gcc to not optimize out, and properly fence,
>>>> the SHM access is a bitch.
>>>
>>> I don't know if 'volatile' will help there or not.
>> 
>> We have tried that, but still run into corner cases.
> 
> Yeah... "volatile" is the approach most people think of and try
> (me included) but it's not designed as a synchronization primitive
> and truly does not work reliably.
> 
> I have bloodied my nose on this issue repeatedly over the years...
> most recently only a few months ago.
> 
> If you want mutual exclusion, you have to use primitives/APIs which
> are specifically designed to provide mutual exclusion... and then hurl
> rotten asparagus at any architecture/code designer who does not
> implement them properly.  Same with atomicity... use primitives and
> APIs designed for this purpose, and then harass the compiler/runtime
> providers until they do them right.

In general, I agree with you.

> With the right primitives and APIs, "volatile" is not necessary.
> Without them, "volatile" is not sufficient, and will certainly cause
> you heartburn at 4 in the morning some day!
> 
> https://www.securecoding.cert.org/confluence/display/cplusplus/CON01-CPP.+Do+
> not+use+volatile+as+a+synchronization+primitive
> 
> https://www.securecoding.cert.org/confluence/display/seccode/CON00-C.+Avoid+r
> ace+conditions+with+multiple+threads

The only reason I am considering volatile is that this use-case seems to
be one where we expect to have only 1 writer and 1 (possibly more)
readers.

I know that with multiple writers better primitives and APIs are needed.

I do not have enough current experience to know if we can use volatile
to handle the case of "Did the data change while I was reading it" case.

This is not to say that we should not use better locking primitives/APIs
if we have them.  As others have mentioned, we do our very best to make
sure that ntpd does not make any blocking calls.

It's also looking like we might be able to us pipes for this as well.
Happy to look at that, and it would be even better if this could all be
implemented under Windows.

H




From MAILER-DAEMON Tue Aug 28 23:31:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6Yzx-0003cC-6N
	for mharc-gpsd-dev@gnu.org; Tue, 28 Aug 2012 23:31:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49930)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T6Yzu-0003a7-Sg
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 23:31:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T6Yzt-0003Qv-Df
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 23:31:18 -0400
Received: from static-71-162-243-5.phlapa.fios.verizon.net
	([71.162.243.5]:37627 helo=snark.thyrsus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <esr@thyrsus.com>) id 1T6Yzt-0003Qi-A0
	for gpsd-dev@nongnu.org; Tue, 28 Aug 2012 23:31:17 -0400
Received: by snark.thyrsus.com (Postfix, from userid 1000)
	id 535F740FDF; Tue, 28 Aug 2012 23:30:34 -0400 (EDT)
Date: Tue, 28 Aug 2012 23:30:34 -0400
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Dave Platt <dplatt@radagast.org>
Message-ID: <20120829033034.GB27908@thyrsus.com>
References: <20120828120132.0e589330.gem@rellim.com>
	<20120828220151.908F280006F@ip-64-139-1-69.sjc.megapath.net>
	<20120828155158.6007e2c3.gem@rellim.com>
	<E1T6UtX-000Gb5-PP@stenn.ntp.org>
	<20120828163149.762fae2e.gem@rellim.com>
	<503D56BC.8070105@radagast.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <503D56BC.8070105@radagast.org>
Organization: Eric Conspiracy Secret Labs
X-Eric-Conspiracy: There is no conspiracy
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 71.162.243.5
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: esr@thyrsus.com
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Aug 2012 03:31:19 -0000

Dave Platt <dplatt@radagast.org>:
> With the right primitives and APIs, "volatile" is not necessary.  Without
> them, "volatile" is not sufficient, and will certainly cause you heartburn
> at 4 in the morning some day!

Bewen there, done that, have the battle scars.  Have a look at our SHM 
export code sometime....
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


From MAILER-DAEMON Wed Aug 29 05:04:42 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6eCY-0001Zs-AR
	for mharc-gpsd-dev@gnu.org; Wed, 29 Aug 2012 05:04:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60279)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mlichvar@redhat.com>) id 1T6eCS-0001Xo-7N
	for gpsd-dev@nongnu.org; Wed, 29 Aug 2012 05:04:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <mlichvar@redhat.com>) id 1T6eCM-0004c7-AF
	for gpsd-dev@nongnu.org; Wed, 29 Aug 2012 05:04:36 -0400
Received: from mx1.redhat.com ([209.132.183.28]:30749)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <mlichvar@redhat.com>) id 1T6eCM-0004bx-2W
	for gpsd-dev@nongnu.org; Wed, 29 Aug 2012 05:04:30 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7T94S0x001404
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <gpsd-dev@nongnu.org>; Wed, 29 Aug 2012 05:04:29 -0400
Received: from localhost (queeg.brq.redhat.com [10.34.24.25])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id q7T94RXI021566
	for <gpsd-dev@nongnu.org>; Wed, 29 Aug 2012 05:04:28 -0400
Date: Wed, 29 Aug 2012 11:03:22 +0200
From: Miroslav Lichvar <mlichvar@redhat.com>
To: gpsd-dev@nongnu.org
Message-ID: <20120829090322.GA3835@localhost>
References: <E1T6Ii7-000FzG-40@stenn.ntp.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E1T6Ii7-000FzG-40@stenn.ntp.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Aug 2012 09:04:40 -0000

On Tue, Aug 28, 2012 at 03:07:51AM -0700, Harlan Stenn wrote:
> We're looking to improve NTP's SHM refclock interface.
> 
> I expect we will keep modes 0 and 1 the same (bit 0), and use bit 1 to
> indicate that the base units will be nanoseconds instead of
> microseconds.
> 
> Similarly, I expect we'll use a union of two structures, the original
> struct shmTime (or make a subset of that structure the union) and the
> new layout; the 'mode' value will be in the same place in the structure.
> 
> http://support.ntp.org/bin/view/Support/ImprovingTheSHMRefclock is where
> we're tracking this work.  If you have any ideas or comments, please
> submit them there.

I know most of us seek for perfection, but is it really necessary
here? Why not go with the approach proposed in the original bug #1232? 

Allocate two ints from the dummy array for clockTimeStampNSec and
receiveTimeStampNSec, the client fills all usecs and nsecs fields, and
the server uses the nsec fields only if nsec / 1000 == usec. That's
it. If they match by accident, it's noise below microsecond.

It will be just couple lines of code on both sides and it will be
backward compatible in both directions. Is it a hack? Yes. But it will
work. Let's not waste time on implementing some complicated protocol
version negotiation.

For the other issues with SHM, if they really cause some problems,
it's probably better to make a new protocol from scratch instead of
trying to extend SHM.

-- 
Miroslav Lichvar


From MAILER-DAEMON Wed Aug 29 18:29:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6qlg-0005em-Vc
	for mharc-gpsd-dev@gnu.org; Wed, 29 Aug 2012 18:29:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34858)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6qld-0005eL-Ce
	for gpsd-dev@nongnu.org; Wed, 29 Aug 2012 18:29:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6qlc-0007pN-6b
	for gpsd-dev@nongnu.org; Wed, 29 Aug 2012 18:29:45 -0400
Received: from catbert.rellim.com ([204.17.205.1]:53436)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gem@rellim.com>) id 1T6qlb-0007et-Pn
	for gpsd-dev@nongnu.org; Wed, 29 Aug 2012 18:29:44 -0400
Received: from localhost (spidey.rellim.com [204.17.205.8])
	(authenticated bits=0)
	by catbert.rellim.com (8.14.5/8.14.5) with ESMTP id q7TMTSdn025204
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
	Wed, 29 Aug 2012 15:29:29 -0700
X-DKIM: OpenDKIM Filter v2.3.2 catbert.rellim.com q7TMTSdn025204
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rellim.com; s=catbert;
	t=1346279369; bh=SZiY76fpWkoA39yFF//32gprreVQdLGgo538sNXZ3Ag=;
	h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
	Mime-Version:Content-Type;
	b=HW8s/yJt8Z/a4T6mfu9jpodMqZyl/OlQGPAKSy82fgHEJHFNwExIgDKibJB9mgfWr
	t/QKYcZZL1DFzeDazHteA==
Date: Wed, 29 Aug 2012 15:29:28 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: Miroslav Lichvar <mlichvar@redhat.com>
Message-ID: <20120829152928.0c663b6f.gem@rellim.com>
In-Reply-To: <20120829090322.GA3835@localhost>
References: <E1T6Ii7-000FzG-40@stenn.ntp.org> <20120829090322.GA3835@localhost>
Organization: Rellim
X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA1;
	boundary="Sig_/ouXkH/o4iewXwKO+gOXdoNN";
	protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 204.17.205.1
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Aug 2012 22:29:47 -0000

--Sig_/ouXkH/o4iewXwKO+gOXdoNN
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Yo Miroslav!

On Wed, 29 Aug 2012 11:03:22 +0200
Miroslav Lichvar <mlichvar@redhat.com> wrote:

> Allocate two ints from the dummy array for clockTimeStampNSec and
> receiveTimeStampNSec, the client fills all usecs and nsecs fields, and
> the server uses the nsec fields only if nsec / 1000 =3D=3D usec. That's
> it. If they match by accident, it's noise below microsecond.

I checked gpsd and the entire shmTime structure is first zeroed before
use.  So that should work and be forward/back compatible.  I could add
that to gpsd git in a few minutes.

As long as we know an 'int' will be at least 4 bytes.  Do we know that?

> For the other issues with SHM, if they really cause some problems,
> it's probably better to make a new protocol from scratch instead of
> trying to extend SHM.

Yes, long term getting off of SHM is a good idea.  Short term we
can patch SHM.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
	gem@rellim.com  Tel:+1(541)382-8588

--Sig_/ouXkH/o4iewXwKO+gOXdoNN
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlA+l8gACgkQBmnRqz71OvMcWwCfYJUhLwn8v19U8jS3j1VtSTCY
s/0AoNz45fNj8d5JpQe/XAIB5PfON/Yx
=ye9O
-----END PGP SIGNATURE-----

--Sig_/ouXkH/o4iewXwKO+gOXdoNN--


From MAILER-DAEMON Thu Aug 30 01:43:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1T6xXF-0008PR-Q3
	for mharc-gpsd-dev@gnu.org; Thu, 30 Aug 2012 01:43:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44497)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <terje@tmsw.no>) id 1T6xXD-0008OO-SP
	for gpsd-dev@nongnu.org; Thu, 30 Aug 2012 01:43:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <terje@tmsw.no>) id 1T6xXC-0001ZL-Kh
	for gpsd-dev@nongnu.org; Thu, 30 Aug 2012 01:43:19 -0400
Received: from asav4.lyse.net ([81.167.36.150]:40194)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <terje@tmsw.no>) id 1T6xXC-0001ZF-E0
	for gpsd-dev@nongnu.org; Thu, 30 Aug 2012 01:43:18 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by asav4.lyse.net (Postfix) with ESMTP id 3BE4F6C091;
	Thu, 30 Aug 2012 07:43:16 +0200 (CEST)
X-Virus-Scanned: amavisd-new at lyse.net
Received: from [127.0.0.1] (172.79-161-68.customer.lyse.net [79.161.68.172])
	by asav4.lyse.net (Postfix) with ESMTP id 1175E6C01F;
	Thu, 30 Aug 2012 07:43:14 +0200 (CEST)
Message-ID: <503EFD72.9010701@tmsw.no>
Date: Thu, 30 Aug 2012 07:43:14 +0200
From: Terje Mathisen <terje@tmsw.no>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
	rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11
MIME-Version: 1.0
To: "Gary E. Miller" <gem@rellim.com>
References: <E1T6Ii7-000FzG-40@stenn.ntp.org> <20120829090322.GA3835@localhost>
	<20120829152928.0c663b6f.gem@rellim.com>
In-Reply-To: <20120829152928.0c663b6f.gem@rellim.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 81.167.36.150
Cc: gpsd-dev@nongnu.org
Subject: Re: [gpsd-dev] SHM refclock improvements
X-BeenThere: gpsd-dev@nongnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <gpsd-dev.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.nongnu.org/archive/html/gpsd-dev>
List-Post: <mailto:gpsd-dev@nongnu.org>
List-Help: <mailto:gpsd-dev-request@nongnu.org?subject=help>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/gpsd-dev>,
	<mailto:gpsd-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Aug 2012 05:43:20 -0000

Gary E. Miller wrote:
> Yo Miroslav!
>
> On Wed, 29 Aug 2012 11:03:22 +0200
> Miroslav Lichvar <mlichvar@redhat.com> wrote:
>
>> Allocate two ints from the dummy array for clockTimeStampNSec and
>> receiveTimeStampNSec, the client fills all usecs and nsecs fields, and
>> the server uses the nsec fields only if nsec / 1000 == usec. That's
>> it. If they match by accident, it's noise below microsecond.

Good idea!

You really don't want a real division in order to do that comparison, 
but all modern compilers will optimize a constant division with a 
reciprocal multiplication instead, so that the real cost will be less 
than 10 clock cycles for optimized code.

Alternatively, code it like this:

   ns = shm->us_field*1000;
   ns_exact = shm->ns_field;

   if ((ns_exact - ns) < 1000)
     ns = ns_exact;

and use the (ns) variable further on
>
> I checked gpsd and the entire shmTime structure is first zeroed before
> use.  So that should work and be forward/back compatible.  I could add
> that to gpsd git in a few minutes.
>
> As long as we know an 'int' will be at least 4 bytes.  Do we know that?

We know that the us field is large enough to store 20-bit quantities, so 
as long as it is a power of two it has to be at least 32 bits.

Making the ns field the same size should therefore be sufficient.

With a reasonably new compiler you should have int32_t, uint32_t, 
int64_t etc available, those would of course be better than an array of 
ints.

Terje

-- 
- <Terje@tmsw.no>
"almost all programming can be viewed as an exercise in caching"


