Patch by Nye Liu <nyet@nyet.org> to fix Debian bug #830889 [1].
Dear Maintainer,
Outlook Office365 IMAP servers now expect a client to issue at least one
EXAMINE before STATUS, or UNSEEN is always zero:
"unsub" folder has two messages, one unseen.
Broken:
56:04.84 > CJFK1 LOGIN "nyet@xxx" "xxx"
56:21.99 < CJFK1 OK LOGIN completed.
56:21.99 > CJFK2 STATUS unsub (MESSAGES UNSEEN)
56:22.20 < * STATUS unsub (MESSAGES 2 UNSEEN 0)
56:22.20 < CJFK2 OK STATUS completed.
Works:
56:46.04 > BPEB1 LOGIN "nyet@xxx" "xxx"
56:51.43 < BPEB1 OK LOGIN completed.
56:51.43 > BPEB2 EXAMINE unsub
56:51.67 < * 2 EXISTS
56:51.67 < * 0 RECENT
56:51.67 < * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
56:51.67 < * OK [PERMANENTFLAGS ()] Permanent flags
56:51.67 < * OK [UNSEEN 2] Is the first unseen message
56:51.67 < * OK [UIDVALIDITY 164] UIDVALIDITY value
56:51.67 < * OK [UIDNEXT 16] The next unique identifier value
56:51.67 < BPEB2 OK [READ-ONLY] EXAMINE completed.
56:51.67 > BPEB3 STATUS unsub (MESSAGES UNSEEN)
56:51.89 < * STATUS unsub (MESSAGES 2 UNSEEN 1)
56:51.89 < BPEB3 OK STATUS completed.
Attached is a patch to always issue EXAMINE before a STATUS.
It doesn't seem like it has to be done before every STATUS, just at least once.
Is only a proof of concept. I don't presume to know the best way to handle
optimizing it.
[1] https://bugs.debian.org/830889
Based partially on a patch by wbk to fix Gentoo bug #410093 [1]. From the
bug report:
After fixing the /proc/meminfo issue, another bug will emerge on systems
where total system RAM in bytes exceeds INT_MAX. The correct top three
processes will be identified, but their load bars will have the wrong
value. This is caused by a value overflow due to storing total system
memory in an "int" type variable. We will end up thinking ((Total RAM)
modulo (INT_MAX)) is our total system RAM, so our percentages will be
inflated when drawing the load bar. This fix will require a bit more care
to follow the flow of data and ensure this value isn't being cast to "int"
along the way. Function return types will need to be changed.
[1] https://bugs.gentoo.org/show_bug.cgi?id=410093
It was resulting in compilation errors:
profzoom@cayke:~/src/dockapps/dockapps/wmget$ xsltproc --nonet
wmget.refentry.xml
I/O error : Attempt to load network entity http://docbook.sourceforge.net/
release/xsl/1.62/manpages/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/
release/xsl/1.62/manpages/docbook.xsl"
error
xsltParseStylesheetFile : cannot parse http://docbook.sourceforge.net/
release/xsl/1.62/manpages/docbook.xsl
compilation error: file wmget.refentry.xml line 19 element refentry
xsltParseStylesheetProcess : document is not a stylesheet
We therefore remove the xml source file and in the future, we will edit the
troff file directly.
We also add the version number to the manpage via autoconf.
Fixes the following warning:
In file included from src/wmtv.c:47:0:
/usr/include/X11/extensions/xf86dga.h:9:2: warning: #warning "xf86dga.h is
obsolete and may be removed in the future." [-Wcpp]
#warning "xf86dga.h is obsolete and may be removed in the future."
^
/usr/include/X11/extensions/xf86dga.h:10:2: warning: #warning "include
<X11/extensions/Xxf86dga.h> instead." [-Wcpp]
#warning "include <X11/extensions/Xxf86dga.h> instead."
^
Need to divide by 16 or 16000 depending on whether using kHz or MHz.
Patch by Nicolas Boullis <nboullis@debian.org> for Debian package version
0.6.5-14 or 15. (Not mentioned in debian/changelog.)
(I couldn't find the patches separately in, e.g., a bug report.)
Patches by Nicolas Boullis <Boullis.Nicolas@libertysurf.fr>.
Corresponding entries from debian/changelog:
0.6.5-8
=======
* Drop privileges to access files, and then regain privileges.
(Closes: #120825)
* A new user's configuration file is automatically created when needed.
* Cleaned up a few possible buffer overflows.
0.6.5-9
=======
* The program does not need any more to be setuid root.
(Closes: #120832)
0.6.5-10
========
* Trying to change channel while the TV is off does nothing, and does
not segfault anymore.
* Corrected strange behavior when the mouse was moved out of a pressed
button.
0.6.5-11
========
* Corrected a bug introduced in version 0.6.5-9, causing the program to
segfault while reverting from fullscreen back to normal mode.
(Closes: #128409)
0.6.5-12
========
* Catch SIGCHLD signals to remove zombies. (Closes: #129435)
0.6.5-13
========
* Added missing #include in wmtv.c.
* Automatically restarts the TV when the external application finishes.
* In fullscreen mode, the left and right arrow keys now behave as
specified in the README file and in the manpage. (Closes: #133301)
* Added the ability to pass some parameters to the external
application.