| iMatix home page
| << | < | > | >>
SMT Logo SMT
Version 2.81

 

senderr

#include "smtlib.h"
int
senderr (const QID *to_queue)

Synopsis

Sends an "ERROR" event to the specified queue, with the value of strerror (errno) as event body. Use this to reply after some i/o access failed. Return values are the same as for event send().

Examples

    senderr (&thread-> event-> sender);

Source Code - (smtlib.c)

{
    char
        *message = strerror (errno);

#if (defined (SMT_TRACE))
    trace ("senderr: error=%s", message);
#endif
    return (event send (
        to_queue,                       /*  Send to specified queue          */
        NULL,                           /*  No queue for reply               */
        "ERROR",                        /*  Name of event to send            */
        (byte *) message,               /*  Event body to send               */
        strlen (message),               /*  Event body size                  */
        NULL, NULL, NULL,               /*  No response events               */
        0));                            /*  No timeout                       */
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation