File: responses.c

package info (click to toggle)
mailfront 2.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,072 kB
  • sloc: sh: 5,549; ansic: 5,083; makefile: 35
file content (17 lines) | stat: -rw-r--r-- 433 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "responses.h"

RESPONSE(accepted_message, 250, "2.6.0 Message accepted.");
RESPONSE(accepted_sender, 250, "2.1.0 Sender accepted.");
RESPONSE(accepted_recip, 250, "2.1.5 Recipient accepted.");
RESPONSE(internal, 451, "4.3.0 Internal error.");
RESPONSE(oom, 451, "4.3.0 Out of memory.");

int number_ok(const response* r)
{
  return r->number < 400;
}

int response_ok(const response* r)
{
  return r == 0 || number_ok(r);
}