Postfix queue manager
steunix / pfqueue Goto Github PK
View Code? Open in Web Editor NEWPostfix queue manager
License: GNU General Public License v2.0
Postfix queue manager
License: GNU General Public License v2.0
When the terminal is too wide (probably more than about 250), pfqueue crashes when trying to display the interface. The issue appears to be improper arguments to mvwinnstr in show_cursor(). The last argument should be BUF_SIZE, not COLS.
Here is my patch (which also increases BUF_SIZE for wide terminals):
diff --git a/frontends/pfq_fencurses.c b/frontends/pfq_fencurses.c
index d6f53e3..958dc19 100644
--- a/frontends/pfq_fencurses.c
+++ b/frontends/pfq_fencurses.c
@@ -18,7 +18,7 @@
#include "pfq_fencurses.h"
#define CAT_BUF_SIZE 20*1024
-#define BUF_SIZE 250
+#define BUF_SIZE 1024
char *a_names[]={
"hold",
@@ -485,7 +485,7 @@ void show_cursor() {
// Current row
i = msg_at(CURROW);
- mvwinnstr ( lwnd, CURROW, 0, buf, COLS );
+ mvwinnstr ( lwnd, CURROW, 0, buf, BUF_SIZE );
if ( pfql_getstatus(pfql_ctx)->use_colors )
wattron ( lwnd, COLOR_PAIR(CP_MSG) );
@@ -504,7 +504,7 @@ void show_cursor() {
// Previous row
if ( PREVROW!=CURROW ) {
i = msg_at(PREVROW);
- mvwinnstr ( lwnd, PREVROW, 0, buf, COLS );
+ mvwinnstr ( lwnd, PREVROW, 0, buf, BUF_SIZE );
msg = pfql_msg_at(pfql_ctx,i);
if ( msg ) {
if ( msg->tagged )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.