Commit graph

1071 commits

Author SHA1 Message Date
Jeremy Sowden bc982a37f6 wmail: added new ChangeLog. 2019-06-07 10:53:48 +01:00
Jeremy Sowden ee0f742a1b wmail: updated the copyright notices. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 0d1f1ed6aa wmail: updated contact details in README. 2019-06-07 10:53:48 +01:00
Jeremy Sowden cbc7dc2fb7 wmail: moved old change-log to a separate file. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 2fbac189e8 wmail: define debug macros as empty if debug is not enabled. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 107922018b wmail: only one DEBUG macro is ever defined. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 07f158ad7e wmail: change "!stat(...) == 0" to "stat(...) == -1" 2019-06-07 10:53:48 +01:00
Jeremy Sowden 51fc232cdb wmail: refactored MakePathName: one malloc; one snprintf instead of two memcpys. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 7740071745 wmail: use automake. 2019-06-07 10:53:48 +01:00
Jeremy Sowden dc8827d41a wmail: renamed configure.in to configure.ac. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 0a852e2639 wmail: check for libdockapp/dockapp.h and fall back to dockapp.h. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 46cd3297ae wmail: use pkg-config for X11 and dockapp. 2019-06-07 10:53:48 +01:00
Jeremy Sowden fa97374dd0 wmail: use DA_VERSION to determine the correct type for DAMakePixmapFromData parameters. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 498c7c8951 wmail: no longer install into or uninstall from $HOME. 2019-06-07 10:53:48 +01:00
Jeremy Sowden fd74dc6f8a wmail: added breaks and explicit fall-through comments to switches. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 4497ebeab1 wmail: declare enum variable with the right type. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 7af1c537ac wmail: fixed warnings about unused parameters. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 18d77b13bb wmail: fixed comparisons between signed and unsigned. 2019-06-07 10:53:48 +01:00
Jeremy Sowden d808c1e21a wmail: use designated initializers to define config. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 7f0d8d12e2 wmail: strcasecmp and strncasecmp are properly declared in strings.h. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 6e495dfe47 wmail: extra debug compiler flags. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 71c126d20e wmail: white-space fixes. 2019-06-07 10:53:48 +01:00
Jeremy Sowden b78df8ed42 wmail: allow for multiple white-space characters between name and address. 2019-06-07 10:53:48 +01:00
Jeremy Sowden c04cc87128 wmail: keep track of buffer lengths and avoid repeated strlen calls. 2019-06-07 10:53:48 +01:00
Jeremy Sowden be89c2a7a0 wmail: strlen returns size_t. 2019-06-07 10:53:48 +01:00
Jeremy Sowden d5312c3133 wmail: use AC_CONFIG_HEADERS to generate config.h. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 356b07a201 wmail: use CPPFLAGS. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 1d1c7e63b1 wmail: don't clobber CFLAGS. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 254328761e wmail: add static to declarations of lots of variables and functions. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 86a8f6f0a1 wmail: added signal-handler for SIGINT and SIGTERM. 2019-05-28 11:07:22 +01:00
Jeremy Sowden a3ef21b122 wmail: skip leading white-space in From: headers. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 9158bb68f3 wmail: DAMakePixmapFromData expects an unsigned short pointer. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 5eef361597 wmail: replaced SIGALRM handler with DA timer call-back.
The application was doing a lot of work in a signal-handler.  This was
not re-entrant and could interact badly with X.  Since the DA event-loop
supports a timer call-back use that instead.
2019-05-28 11:07:22 +01:00
Jeremy Sowden e4760eb90f wmail: fix prototypes of functions accepting no parameters. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 49def3a155 wmail: use calloc, instead of malloc + memset. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 9f0821af1f wmail: fix memory leaks. 2019-05-28 11:07:22 +01:00
Jeremy Sowden e0f5120b9d wmail: FileNameConcat does exactly the same thing as MakePathName: get rid of it. 2019-05-28 11:07:22 +01:00
Jeremy Sowden a8261ff053 wmail: handle allocation failures. 2019-05-28 11:07:22 +01:00
Jeremy Sowden adf1164fba wmail: consistent 4-column indentation with 8-character tabs. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 293e8aab96 wmail: added .gitignore. 2019-05-28 11:07:22 +01:00
Torrance, Douglas b904bd01b0 wmbiff: Bump to version 0.4.33 2019-03-01 11:49:03 +00:00
Torrance, Douglas 9527870311 wmbiff: Remove unnecessary loop.
The last release of wmbiff included a patch by Nye Liu from Debian
bug #917467 [1].  However, the second part of that patch is not necessary.
From Andreas Metzler's comment

    I am not sure about the second part of the patch. I understand wmbiff
    breaking on GNUTLS_E_AGAIN from gnutls_read, because this only started
    to happen recently (with TLS1.3) on blocking sockets.

    What I do not get from my rudimentary understanding C programmimg is the
    second part, this is in the else of "if (scs->tls_state)", so, afaiui for
    non-encrypted connections. Is the change necessary there at all, is it
    the right thing to retry read on EAGAIN then?

We revert the second part of the patch.

[1] https://bugs.debian.org/917467
2019-03-01 11:49:03 +00:00
Torrance, Douglas e807986e6e wmbiff: Bump to version 0.4.32. 2019-02-13 02:32:15 +00:00
Torrance, Douglas 01cdccc241 wmbiff: handle EAGAIN or GNUTLS_E_AGAIN
From Debian bug #917467, reported by Nye Liu <nyet@nyet.org> [1]:

If gnutls_read() or read() report EAGAIN, tlscomm_expect() fails:

wmbiff/nyet  comm: wrote a000 CAPABILITY
wmbiff/nyet  comm: imap.***.***:993: expecting: * CAPABILITY
wmbiff/nyet  comm: imap.***.***:993: gnutls error reading: Resource temporarily unavailable, try again.
wmbiff/nyet  imap4: unable to query capability stringwmbiff/nyet  comm: wrote a002 LOGOUT
wmbiff/nyet  comm: imap.***.***:993: closing.

[1] https://bugs.debian.org/917467
2019-02-13 02:32:15 +00:00
Carlos R. Mafra c78465cae2 Revert "wmnet: simplify updateStats_dev() a bit"
This reverts commit 49944a01ae.

Shame on me.
2019-01-12 22:18:19 +00:00
Carlos R. Mafra bd0d7d1f67 wmmemload: Use MemAvailable from kernel > v3.14 to display memory usage
After the introduction of MemAvailable in the kernel v3.14 one can
estimate how much RAM memory is being "used" by how much it is left
before the system starts swapping.

That is the reason why I want to monitor memory usage, to know
how close the system is to swapping. Therefore I propose to
use MemAvailable to compute the percentage of "used" memory.
Theoretically, after this patch a 100% memory usage is a more
accurate description of "yeah, we need to swap from now on".

See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
2019-01-12 22:05:06 +00:00
Carlos R. Mafra 774e4f769f wmmemload: call usleep() directly in main loop
The reason is the same as in the analogous patch for wmwifi
in commit 1e34ea7f980; it improves considerably the efficiency.

Keeping the 'interval' unchanged (set to 1 sec), with this change
the number of wakeups as measured by powertop goes from around 14 wakeups/sec
to around 2 wakeup/sec.
2019-01-12 21:22:15 +00:00
Carlos R. Mafra dd5d59b8f9 wmwifi: Display interface/essid in 2-second intervals
Base the decision to display either the interface name or essid
on a time interval rather than how many times the update() function
is called. The time interval is chosen to be 2 seconds.

The old logic would swap the display after update() was called
50 times. If 'interval' between updates is a sane value around 1 second,
it would take 50 seconds to swap the name on display.
2019-01-12 20:54:43 +00:00
Carlos R. Mafra 1e34ea7f98 wmwifi: call usleep() directly in main loop
I noticed using powertop that the number of wakeups per second
generated by wmwifi did not correlate well with the update interval,
where I'd expect approximately 1 wakeup if the update interval was 1 sec.

Strangely enough, calling the function

dockapp_nextevent_or_timeout(&event, update_interval * 1000)

in the main loop (note that I already replaced * 100 by * 1000 above)
with update_interval = 1 generates around 15 wakeups/sec here.

Calling usleep() in the loop instead leads to fewer wakeups, around 1/sec.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2019-01-12 19:20:30 +00:00
Carlos R. Mafra 742d4deddf asmon: Just assume linux kernel > v2.6
Running asmon in a new kernel (v4.19 here) did not display memory information
because the code checked whether the kernel was _exactly_ v2.6.

Although I could modify the check for > v2.6 I decided to drop support
for versions less than v2.6 (released in 2003).
2019-01-12 18:34:03 +00:00