comparison src/context.h @ 99:f8963ddf7143 stable-5-7

failed to return a value from parse_verify()
author carl
date Fri, 23 Sep 2005 07:58:34 -0700
parents cc3b79349c9c
children aa07452e641b
comparison
equal deleted inserted replaced
98:91c27c00048f 99:f8963ddf7143
37 time_t stamp; 37 time_t stamp;
38 char efrom[maxlen]; // last envelope from sent on this socket 38 char efrom[maxlen]; // last envelope from sent on this socket
39 int pending; // unread bytes in buffer, not including the null terminator 39 int pending; // unread bytes in buffer, not including the null terminator
40 char buffer[maxlen]; 40 char buffer[maxlen];
41 public: 41 public:
42 SMTP(int f) {fd = f; error = false; efrom[0] = '\0';}; 42 SMTP(int f) {fd = f; error = false; now(); efrom[0] = '\0'; init();};
43 ~SMTP() {if (!error) quit(); closefd();}; 43 ~SMTP() {if (!error) quit(); closefd();};
44 void init() {pending = 0; buffer[0] = '\0';}; 44 void init() {pending = 0; buffer[0] = '\0';};
45 void append(char *c) {strncat(buffer, c, max(0, maxlen-1-(int)strlen(c)));}; 45 void append(char *c) {strncat(buffer, c, max(0, maxlen-1-(int)strlen(c)));};
46 bool err() {return error;}; 46 bool err() {return error;};
47 void now() {stamp = time(NULL);}; 47 void now() {stamp = time(NULL);};