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

int msg_set_address ( msg_t msg,
su_sockaddr_t const *  su,
socklen_t  sulen 

Set message address.

Copy the supplied socket address to the socket address structure associated with the message.

msg pointer to msg object
su pointer to socket address structure
sulen length of socket address structure
See also:
msg_addrinfo(), msg_get_address(), msg_addr_zero(), msg_addr_copy().

Definition at line 303 of file msg.c.

References su_sockaddr_u::su_family.

Referenced by tport_recv_stream().

  if (sulen < (sizeof msg->m_addr) && msg && su) {
    memcpy(msg->m_addr, su, msg->m_addrinfo.ai_addrlen = sulen);
    msg->m_addrinfo.ai_family = su->su_family;
    return 0;
  if (msg)
    msg->m_errno = EFAULT;
  return -1;

Generated by  Doxygen 1.6.0   Back to index