The reference date is MST (seven hours west of GMT). This is a very
common mistake when constructing formatting strings to be used with
time.Format.
Since we converted all dates that includes zone information to UTC
*before* outputting in Z time, this bug did not affect the output
strings. But it's best to use the correct reference time anyway, in case
we later add a string representation including zone information that is
not UTC.
Add support for parsing To/Cc fields and passing an array
of addresses back to the compose window.
Improve handling of Msg. As per the templates [spec][]:
> Msg: -- Start of message body. All text following Msg: is placed in the body of the message.
and a few templates have text and variables on the same line as the "Msg:".
Therefore, simply strip out the Msg: and use that to mark the rest of
the template as being part of the body.
[spec]: http://www.philsherrod.com/Winlink/RMS_Express_Message_Templates.pdf
[Changed "var inBody = true" to "inBody := true" per Martin's
suggestion]
Signed-off-by: Corey Minyard <cminyard@mvista.com>
By doing graceful shutdown, we're able to properly close all of the open
resources such as modem connections and ongoing sessions.
This will allow transport drivers controlling stateful TNCs (e.g.
ptc-go) to recover the initial TNC state before termination.
Resolves#314
* Deprecate `forms_path` in the config file and replace with `--forms` flag
* Clean up `optionsSet()` to show correct defaults
* Clean up places that detected when `forms_path` was not configured (before it had a default)
Resolves https://github.com/la5nta/pat/issues/287
* Replace(..., -1) with ReplaceAll
* Variable names hiding packages
* Error messages start with lowercase and no end punctuation
* Don't `defer` in a loop
* Etc.
When a form .txt file only specifies one HTML template, it's supposed to be used for both compose and view.
Also fix a Javascript error. Now that "RADIOGRAM & RRI Forms" is coming through, we can't have ampersand in an HTML element ID.
This primes the user to run a forms update with zero configuration, but doesn't actually do it for them. This could cause errors if they try to use forms before running the update. With some more work, we could make this more like the RMS list where the update happens proactively. For now, I think this is good enough.
Fixes#256
* Call resp.Body.Close()
* Don't log errors, return them to caller
* More idiomatic variable names
* Reuse single http.Client instance, and wrapper for Get call
* Stop using ioutil
* Don't Panic(TM)
* Fetch latest version info over HTTPS
Still need to address bugs around caching and un-configured forms path.
When watching directories with many files using fsnotify, we might end
up reaching the limit on max open file descriptors. The first limit
reached is often a soft limit, usually substantially lower than the hard
limit set by the OS.
This patch tries to raise the soft limit before starting fsnotify. This
is especially important on macOS which has a default soft limit of only
256.
Closes#176
New config field service_codes takes an array of strings, each string
should be a valid service code that is used when updating rmslist.
I've extended the rmslist cache to support this. We now have multiple
cache files, one for each combination of service codes.
Closes#162
This change was announced by the WDT after they migrated to the new
AWS 'cloud' CMS. The old hostname (server.winlink.org) is expected to
be operational for at least one year.
In addition to changing the config defaults, this commit includes a
(temporary) function that will rewrite user's config to replace the
old hostname.
Closes#104