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

TPORT_DLL int tport_release ( tport_t *  self,
int  pendd,
msg_t msg,
msg_t reply,
tp_client_t client,
int  still_pending 
)

Do not wait for response anymore.

Mark message as no more pending

Definition at line 4108 of file tport.c.

References SU_DEBUG_1, SU_DEBUG_7, su_seterrno(), and tport_release().

Referenced by nta_agent_close_tports(), and tport_release().

{
  tport_pending_t *pending;

  if (self == NULL || pendd <= 0 || pendd > (int)self->tp_plen)
    return su_seterrno(EINVAL), -1;

  pending = self->tp_pending + (pendd - 1);

  if (pending->p_client != client ||
      pending->p_msg != msg) {
        SU_DEBUG_1(("%s(%p): %u %p by %p not pending\n",
                  __func__, (void *)self,
                  pendd, (void *)msg, (void *)client));
    return su_seterrno(EINVAL), -1;
  }

  SU_DEBUG_7(("%s(%p): %p by %p with %p%s\n",
            __func__, (void *)self,
            (void *)msg, (void *)client, (void *)reply,
            still_pending ? " (preliminary)" : ""));

  /* sigcomp can here associate request (msg) with response (reply) */

  if (still_pending)
    return 0;

  /* Just to make sure nobody uses stale data */
  memset(pending, 0, sizeof(*pending));
  pending->p_client = self->tp_released;
  self->tp_released = pending;
  self->tp_pused--;
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index