Coder Social home page Coder Social logo

pfqueue's Introduction

pfqueue

Postfix queue manager

pfqueue's People

Contributors

steunix avatar

Stargazers

 avatar  avatar

Watchers

 avatar

pfqueue's Issues

Crashes on wide terminals

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 )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.