Broadband-Hamnet™ Forum :: Firmware
Welcome Guest   [Register]  [Login]
 Subject :Bug (or efficiency) in handling services urls.. 2015-01-21- 12:08:52 
WB6TAE
Member
Joined: 2014-05-01- 23:48:12
Posts: 70
Location

I have found what may be a bug, or a design efficiency in the way services urls are input and stored.

The issue:

The input form  (www.cgi-bin/ports) assumes that there will always be a port number attached for the url. This may be true when the protocol is http/https. But it is not the case for all protocols.

Suggestion. The form handler should accept an empty port field, and when the port field is empty, it should also delete the ";". This would not break http/https urls that use port 80 as the default.

Further, the code that reads /etc/config/services and creates /var/run/services_olsr also appears to not like missing port numbers. If the port number is not present, it does not copy the service entry.  And, lastly, the code in /www/cgi-bin/mesh will not add a url from /var/run/services_olsr if it does not contain a port.


The specific use case here is the entry of urls for TeamTalk4, which are of the form:

tt://tt4us.bearware.dk?tcpport=10333&udpport=10333&username=guest&password=guest


IP Logged
 Subject :Re:Bug (or inefficiency) in handling services urls.. 2015-01-21- 13:57:24 
WB6TAE
Member
Joined: 2014-05-01- 23:48:12
Posts: 70
Location

Ok on the difficulty.  I wasn't sure how much of that code was bbhn and how much was olsr. There might be a hack to get around it based on manual entries... but probably doomed. In any case, I'll learn more about the guts of this beast.

On the tt://  url. Te port numbers are not the port numbers the program listens on. They are the port arguments of the server it should connect to. In fact, the request is sent to TeamTalk by whatever url/application mapping mechanism the OS supports. In my case, MacOS, TeamTalk actually launches, but can't automatically make the connection to the server because the url doesn't parse (because of the :port).

No huge problem... But, as people start extending more services over the mesh, we will probably run into problems like this again.

BTW, I just realized my spell "checker" changed inefficiency to efficiency in the Subject. Not quite what I intended.

Richard



[KG6JEI 2015-01-21- 12:56:54]:

...My guess is it would likely be protocol breaking to change this (having not fully looked at all the handling code) and would have to wait for submission to a protocol jump (Maybe a V4 canidate - should probably be brought up on BBHNDev instead for discussion in depth)

(Side Rant: seriously? who uses a port=parameter in a url instead of a server:colon port  ? That is the first time I have ever seen that done *eye rolls at team talk* just out of curiosity what happens if you put a port in anyways in server:port format and remove the port parameter does that by any chance work?)

IP Logged
Last Edited On: 2015-01-22- 12:47:01 By WB6TAE for the Reason
 Subject :Re:Re:Bug (or inefficiency) in handling services urls.. 2015-01-22- 12:48:39 
WB6TAE
Member
Joined: 2014-05-01- 23:48:12
Posts: 70
Location
As usual, there was a quick, and acceptable work-around. I just created a web page listing the local servies, in whatever url format I want, and advertise that page as a "service."
IP Logged
Page # 


Powered by ccBoard


SPONSORED AD: