Bug#360344: aprsmon sends silly program/version to aprsd

2006-04-01 Thread g7iii
Package:aprsdigi
Version:2.4.4-1
Severity: Minor
Tags: sid, patch, upstream

Hi Hamish,

When an aprsd instance connects to aprsmon via inetd, it gets a
real silly program name/version back.

Attached is a patch to aprsmon.c to extend the -title switch, so that
it works for aprsd as well as JavAPRS. I've also attached a patch to
the man page.


Best Regards

Iain

--- aprsdigi-2.4.4/aprsmon.c2004-02-24 21:34:05.0 +
+++ aprsdigi-2.4.4-iii/aprsmon.c2006-04-01 13:27:28.012544864 +0100
@@ -190,6 +190,7 @@ int main(int argc, char **argv)
 uname(me);
 printf(aprsmonJAVA:javaMSG  :Linux APRS server (%s-%s by Alan Crosswell, 
N2YGK) on %s running %s %s\r\n,
   PACKAGE, VERSION, me.nodename, me.sysname, me.release);
+printf(# %s\r\n,title);
 #ifdef USE_SHM
 (void) shm_slave(stdout,infofile);
 #endif
--- aprsdigi-2.4.4/aprsmon.82004-02-24 21:34:05.0 +
+++ aprsdigi-2.4.4-iii/aprsmon.82006-04-01 14:02:14.307379840 +0100
@@ -55,7 +55,11 @@ Default is 30.
 .BI -t title
 Sets the 
 .I javAPRS
-title string.  Default is Live data from Linux.
+or
+.I aprsd
+title string.  Default is Live data from Linux. For use with aprsd the
+format must be something like aprsmon v2.4.4 padd padb. pada and padb
+can be anything, and are ignored but you *must* have 4 words in all.
 .TP 10
 .BI -i infofile
 .I Infofile


Bug#356081: Okay, Me Bad

2006-03-10 Thread g7iii
Hi Hamish,

Okay, I should learn to read the code closer. Works on Hub lines as
well (Of Course - Duh). Not tested server lines specifically. Feel
free to drop or change the documentation part of the patch, as it's
incorrect, and I didnt realise Igate connections were depreceated


Iain



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#356237: aprsd has wrong user count when using hubs

2006-03-10 Thread g7iii
Package: aprsd
Version: 2.2.5-13
Severity: minor
Tags: sid, patch, upstream

Hi Hamish,

I'm not sure what the correct behaviour is when aprsd uses hub
connections, so this may be a false bug report.

For every non connected hub, aprsd was subtracting one from the
connection count. This lead to having -1 users, with one telnet
user logged on, which certainly wasnt right!

Other comments in the code lead me to believe that the user
count should include outgoing server/hub/igate connections,
this patch seems to work for hub connections, certainly.


All the Best

Iain


--- aprsd-2.2.5-13/src/servers.cpp  2006-02-28 16:11:08.520805144 +
+++ aprsd-2.2.5-13-tst/src/servers.cpp  2006-03-10 15:12:28.511962936 +
@@ -502,8 +502,8 @@ int getConnectedClients(void)
 count++;
 
 for (int i = 0; i  nIGATES; i++)
-if (!cpIGATE[i].connected)
-count--;
+if (cpIGATE[i].connected)
+count++;
 
 
return count;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#356081: aprsd doesnt allow a JavAPRS filter to be specified

2006-03-09 Thread g7iii
Package: aprsd
Version: 1:2.2.5-13-3
Severity: wishlist
Tags: patch,sid,upstream


Hi Hamish,

aprsd doesnt allow a JavAPRS filter to be specified when it connects
to servers/hubs/igates. Typically you need to do this if you connect
to the user defined filter port (14580) on a remote javAPRS host.

Patch to extend the igate lines in aprsd.conf is attached, along
with some documentation in aprsd.conf. The patch is real simple
(I don't even know C++...)

Would you consider including it in the debian build, or even pushing
it upstream ? I only did it on igate lines because: a) That suited my
needs, and b) It was quick and easy. Patch could be easily extended
to hit server and hub lines as well.


I use this so I can just pull the telemetry from PCSAT, PCSAT2, and
friends, and then connect multiple aprstlm clients to my local (same LAN)
aprsd server, instead of connecting them all up to a Tier 2 server.

I guess this is a slightly different use for aprsd than a lot of folks,
but no less valid, and does help reduce my bandwidth requirements.


All the Best

Iain


diff -uprN aprsd-2.2.5-13/admin/aprsd.conf aprsd-2.2.5-13-iii/admin/aprsd.conf
--- aprsd-2.2.5-13/admin/aprsd.conf 2006-02-28 16:11:09.122713640 +
+++ aprsd-2.2.5-13-iii/admin/aprsd.conf 2006-03-09 15:57:27.749412960 +
@@ -211,6 +211,23 @@ Server first.aprs.net 23 hub-sr
 #server wv.aprs.net 1313
 #-
 #
+#Igate connections
+#
+# Igate connections are client connections for connecting to remote igate
+# servers etc. G7III extended their functionality to be able to specify a
+# filter to a JavAPRS server for use on a user defined port. General
+# format is:
+#
+#igate server port user passcode filter
+#
+#passcode should be -1 unless you *intend* to send data upstream to
+#the remote igate. Example:
+#
+# Grab all APRS packets from PCSAT and PCSAT2
+#
+#igate fred.aprs.net 14580 Z0ZZZ -1 p/w3ado/pcsat
+#
+#-
 #Define server listen ports
 #Read ports.html for more info.
 #
diff -uprN aprsd-2.2.5-13/src/aprsd.cpp aprsd-2.2.5-13-iii/src/aprsd.cpp
--- aprsd-2.2.5-13/src/aprsd.cpp2006-02-28 16:11:08.456814872 +
+++ aprsd-2.2.5-13-iii/src/aprsd.cpp2006-03-09 15:55:54.583576320 +
@@ -395,6 +395,9 @@ int serverConfig(const string cf)
 if (nTokens = 5)
 cpIGATE[m].pass = strdup(token[4].c_str()); //Get 
Passcode
 
+if (nTokens = 6)
+cpIGATE[m].filter = strdup(token[5].c_str()); //Get 
Filter String
+
 /* If passcode is valid allow the this server to send data 
up stream */
 if ((validate(cpIGATE[m].user, cpIGATE[m].pass,APRSGROUP, 
APRS_PASS_ALLOW) == 0)){
 cpIGATE[m].mode = MODE_RECV_SEND;
diff -uprN aprsd-2.2.5-13/src/servers.cpp aprsd-2.2.5-13-iii/src/servers.cpp
--- aprsd-2.2.5-13/src/servers.cpp  2006-02-28 16:11:08.520805144 +
+++ aprsd-2.2.5-13-iii/src/servers.cpp  2006-03-09 15:54:39.679963400 +
@@ -2715,6 +2715,8 @@ ConnectParams* getNextHub(ConnectParams*
  pcp-pass
   vers 
  VERS
+  filter 
+ pcp-filter
  \r\n;
 
 //Send logon string to IGATE or Hub
diff -uprN aprsd-2.2.5-13/src/servers.h aprsd-2.2.5-13-iii/src/servers.h
--- aprsd-2.2.5-13/src/servers.h2003-05-29 04:09:39.0 +0100
+++ aprsd-2.2.5-13-iii/src/servers.h2006-03-09 15:54:39.685962488 +
@@ -71,6 +71,7 @@ struct ConnectParams {
 string user;
 //char* pass;
 string pass;
+string filter;
 //char* remoteIgateInfo;
 string remoteIgateInfo;
 int   nCmds;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]