IP_MsgResize

IP_MsgResize -- resizes the IP_MsgBuffer, if possible.

Syntax

int IP_MsgResize(IP_Msg* message, int datalen);

Arguments

message

A pointer to a message.

datalen

The new length of the data portion of the IP_MsgBuffer, pointed to as message->msg.

Returns

0 on success, -1 on failure and errno is set:

The msg portion of message is set to NULL.

Description

This function assumes that the message encapsulates an IP_MsgBuffer, and resizes the data portion of that IP_MsgBuffer to datalen bytes through a call to ME_Realloc.

See Also

Messages, IP_MsgDefaultSize

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.