Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SOFIAPUBFUN int su_msg_create ( su_msg_r  rmsg,
su_task_r const   to,
su_task_r const   from,
su_msg_f  wakeup,
isize_t  size 

Allocates a message of given size.

The function su_msg_create() allocates a message with given data size. If successful, it moves the new message handle to the rmsg.

rmsghandle to the new message (may be uninitialized prior calling)
tothe recipient task
fromthe sender task
wakeupfunction that is called when message is delivered
sizesize of the message data
Return values:
0if successful,
-1if message allocation fails.

Definition at line 1097 of file su_root.c.

References su_msg_create(), and su_msg_new().

Referenced by su_msg_create(), and su_msg_reply().

  if (su_msg_new(rmsg, (size_t) size) == 0) {
    SU_TASK_COPY(rmsg[0]->sum_to, to, su_msg_create);
    SU_TASK_COPY(rmsg[0]->sum_from, from, su_msg_create);
    rmsg[0]->sum_func = wakeup;
    return 0;

  return -1;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index