Skip to content

Commit

Permalink
qmail-send.c, slowq-send.c: return from exit_todo if flagtodoalive is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Dec 30, 2023
1 parent 61f089e commit e7d3072
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 3 additions & 1 deletion indimail-mta-x/doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ o - New program printass to print entries in users/cdb, users/assign file
control/global_vars to point to control/servercipherlist
- 29/12/2023
82. svctool: use split from conf-split, bigtodo=0 when creating queue
83. qlocal_upgrade: fixed cron copying cron config
83. qlocal_upgrade: fixed copying cron config
- 30/12/2023
84. qmail-send.c, slowq-send.c: return from exit_todo if flagtodoalive is 0

* Tue Oct 17 2023 18:34:04 +0000 Manvendra Bhangui <indimail-mta@indimail.org> 3.0.5-1.1%{?dist}
Release 3.0.5-1.1 Start 11/09/2023 End 17/10/2023
Expand Down
11 changes: 8 additions & 3 deletions indimail-mta-x/qmail-send.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: qmail-send.c,v 1.113 2023-12-25 09:30:51+05:30 Cprogrammer Exp mbhangui $
* $Id: qmail-send.c,v 1.114 2023-12-30 09:21:30+05:30 Cprogrammer Exp mbhangui $
*/
#include <sys/types.h>
#include <unistd.h>
Expand Down Expand Up @@ -205,14 +205,16 @@ sigint()

static stralloc todoline = { 0 };
static char todobuf[2048];
static int todofdi, todofdo, flagtodoalive;
static int todofdi = 8, todofdo = 7, flagtodoalive;
int flagspawnalive[CHANNELS];

static void
exit_todo()
{
int r;

if (!flagtodoalive)
return;
if (write(todofdo, "X", 1)) ; /*- keep compiler happy */
r = read(todofdi, todobuf, sizeof (todobuf));
if (r > 0 && todobuf[0] == 'L')
Expand Down Expand Up @@ -2715,7 +2717,7 @@ main(int argc, char **argv)
void
getversion_qmail_send_c()
{
static char *x = "$Id: qmail-send.c,v 1.113 2023-12-25 09:30:51+05:30 Cprogrammer Exp mbhangui $";
static char *x = "$Id: qmail-send.c,v 1.114 2023-12-30 09:21:30+05:30 Cprogrammer Exp mbhangui $";

x = sccsiddelivery_rateh;
x = sccsidgetdomainth;
Expand All @@ -2725,6 +2727,9 @@ getversion_qmail_send_c()

/*
* $Log: qmail-send.c,v $
* Revision 1.114 2023-12-30 09:21:30+05:30 Cprogrammer
* return from exit_todo if flagtodoalive is 0
*
* Revision 1.113 2023-12-25 09:30:51+05:30 Cprogrammer
* made OSSIFIED configurable
*
Expand Down
15 changes: 10 additions & 5 deletions indimail-mta-x/slowq-send.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: slowq-send.c,v 1.36 2023-12-25 09:31:28+05:30 Cprogrammer Exp mbhangui $
* $Id: slowq-send.c,v 1.37 2023-12-30 09:23:58+05:30 Cprogrammer Exp mbhangui $
*/
#include <sys/types.h>
#include <unistd.h>
Expand Down Expand Up @@ -201,9 +201,9 @@ static void
sigterm()
{
flagexitsend = 1;
slog(1, "alert: ", argv0, ": pid ", mypid, " got TERM: ", queuedesc, "\n", NULL);
if (todopid)
kill(todopid, SIGTERM);
slog(1, "alert: ", argv0, ": ", mypid, ": got TERM: ", queuedesc, "\n", NULL);
}

static void
Expand All @@ -230,14 +230,14 @@ static void
sigalrm()
{
flagrunasap = 1;
slog(1, "alert: ", argv0, ": ", mypid, ": got ALRM: ", queuedesc, "\n", NULL);
slog(1, "alert: ", argv0, ": ", mypid, " got ALRM: ", queuedesc, "\n", NULL);
}

static void
sighup()
{
flagreadasap = 1;
slog(1, "alert: ", argv0, ": ", mypid, ": got HUP: ", queuedesc, "\n", NULL);
slog(1, "alert: ", argv0, ": ", mypid, " got HUP: ", queuedesc, "\n", NULL);
}

static void
Expand All @@ -258,6 +258,8 @@ exit_todo()
{
int r;

if (!flagtodoalive)
return;
if (write(todofdo, "X", 1)) ; /*- keep compiler happy */
r = read(todofdi, todobuf, sizeof (todobuf));
if (r > 0 && todobuf[0] == 'L')
Expand Down Expand Up @@ -3808,7 +3810,7 @@ main(int argc, char **argv)
void
getversion_slowq_send_c()
{
static char *x = "$Id: slowq-send.c,v 1.36 2023-12-25 09:31:28+05:30 Cprogrammer Exp mbhangui $";
static char *x = "$Id: slowq-send.c,v 1.37 2023-12-30 09:23:58+05:30 Cprogrammer Exp mbhangui $";

x = sccsiddelivery_rateh;
x = sccsidgetdomainth;
Expand All @@ -3818,6 +3820,9 @@ getversion_slowq_send_c()

/*
* $Log: slowq-send.c,v $
* Revision 1.37 2023-12-30 09:23:58+05:30 Cprogrammer
* return from exit_todo if flagtodoalive is 0
*
* Revision 1.36 2023-12-25 09:31:28+05:30 Cprogrammer
* made OSSIFIED configurable
*
Expand Down

0 comments on commit e7d3072

Please sign in to comment.