diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/srsforward.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
Diffstat (limited to 'src/srsforward.c')
-rw-r--r-- | src/srsforward.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/srsforward.c b/src/srsforward.c index c855d36..0477d90 100644 --- a/src/srsforward.c +++ b/src/srsforward.c @@ -23,6 +23,7 @@ void die_nomem() { logmsg(WHO, 111, FATAL, "out of memory"); } + void die_control() { logmsg(WHO, 110, FATAL, "Unable to read control files"); @@ -35,14 +36,14 @@ struct constmap mapsrsdomains; stralloc srshost = {0}; stralloc srserror = {0}; -/** @file srsforward.c - @brief forwarding mails with SRS enhanced addresss - @return 0 on success (forwarded or not) - -3 SRS error with error output - 111 no memory / processing error - 110 control file not readable +/** + @file srsforward.c + @brief forwarding mails with SRS enhanced addresss + @return 0 on success (forwarded or not) + -3 SRS error with error output + 111 no memory / processing error + 110 control file not readable */ - static int srserror_str(int code) { if (!stralloc_copys(&srserror, "SRS: ")) die_nomem(); @@ -128,13 +129,16 @@ int main(int argc, char **argv) if (sendhost[j - 1] == '.') { if (!stralloc_copys(&srshost, sendhost)) die_nomem(); if (!stralloc_cats(&srshost, host)) die_nomem(); - } else if (!stralloc_copys(&srshost, sendhost)) + } else if (!stralloc_copys(&srshost, sendhost)) { die_nomem(); - } else if (!stralloc_copys(&srshost, host)) + } + } else if (!stralloc_copys(&srshost, host)) { die_nomem(); + } if (!stralloc_0(&srshost)) die_nomem(); - } else + } else { die_control(); + } /* Let's go SRS rewrite */ |