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

SOFIAPUBFUN int su_msg_send_to ( su_msg_r  rmsg,
su_task_r const   to_task,
su_msg_f  wakeup 
)

Send message to the to_task and mark from_task as sender.

Definition at line 1347 of file su_root.c.

References su_msg_destroy(), and su_msg_send_to().

Referenced by su_msg_send_to().

{
  assert(rmsg); assert(to_task);

  if (rmsg[0]) {
    su_msg_t *msg = rmsg[0];

    if (wakeup)
      msg->sum_func = wakeup;

    if (msg->sum_to->sut_port &&
      msg->sum_to->sut_port != to_task->sut_port) {
      SU_TASK_ZAP(msg->sum_to, "su_msg_send_to");
    }

    if (to_task->sut_port != NULL) {
      msg->sum_to->sut_port = NULL;
      msg->sum_to->sut_root = to_task->sut_root;

      return su_port_send(to_task->sut_port, rmsg);
    }

    su_msg_destroy(rmsg);
    errno = EINVAL;
    return -1;
  }

  return 0;
}

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