Table of Contents

Name

imme_copy - Makes a verbatim copy of a message header and content

Synopsis

#include <imta.h>

int imme_copy(imme_t me, immd_t md);

Description

Use imme_copy() to efficiently copy to a new message being enqueued a verbatim copy of a message being dequeued. Only the portion of the dequeued message following the read point for that message will be copied. Thus, if the entire dequeued message - header and content - is to be copied, then it may be necessary to first call immd_rewind. imme_copy() is especially useful in cases where a message needs to have its envelope changed but be left enqueued. For example, when a message was successfully delivered to some but not all recipients. In that case, if some of the recipients could not be delivered to owing to temporary problems, the message should be re-enqueued verbatim to just those recipients who could not be handled because of temporary problems. In such a case, be sure to also call imme_AliasNoExpansion while enqueuing the new message. me is the enqueue context previously created with imme_init. md is a dequeue context created with immd_init.

Return Values

imme_copy() returns IMRC_OK when successful.

Otherwise, one of the following error codes is returned:

IMRC_BAD_CONTEXT
The enqueue context me or the dequeue context md has not been initialized or has been corrupted. Make sure imme_init() or immd_init() respectively, has been previously called.
IMRC_NO_ENVELOPE
The message envelope has not been created. Call imme_start_envelope() to create it.

Attributes

_______________________________________

Attribute Type
Attribute Value _______________________________________
Architecture
sparc, x86 _______________________________________
Availability
SUNWimsdk _______________________________________
MT-Level
MT-Safe _______________________________________
Interface Stability
Stable _______________________________________ 9 |9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9 777777777777777777779 |9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9 777777777777777777779 |9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9|9 7777777777777777777SEE ALSO imme_init(3) , imme_AliasNoExpansion(3) , immd_init(3) , immd_rewind(3)


Table of Contents