Qsmtp  0.30dev
Functions
reply.c File Reference

functions to read and parse server replies More...

#include <log.h>
#include <netio.h>
#include <qremote/qremote.h>
#include <errno.h>
#include <string.h>
#include <syslog.h>

Functions

static void err_network (int error)
 
int netget (const unsigned int terminate)
 get one line from the network More...
 
void dieerror (int error)
 

Detailed Description

functions to read and parse server replies

This file contains the functions to read and parse server replies, as well as some helper functions.

Function Documentation

int netget ( const unsigned int  terminate)

get one line from the network

Parameters
terminateif the program should be terminated on errors
Returns
SMTP return code of the message or negative error code
Return values
-EINVALthe server send a reply that was syntactically invalid

If an out of memory condition occurs the program will be terminated regardless of the terminate parameter.

If an error occurs and terminate is not set the connection will be shut down before the function returns unless the return code is -EINVAL.