Commit f0257d2c authored by Pekka Pessi's avatar Pekka Pessi

Not using stateless functions anymore in nea.

darcs-hash:20051107183606-65a35-ed36b59948ee3c6be5c6ceb1cd84bc2f355f7aa4.gz
parent 8fe82e74
......@@ -31,9 +31,6 @@
* @author Martti Mela <Martti.Mela@nokia.com>
*
* @date Created: Fri Feb 7 13:23:44 EET 2003 ppessi
*
* @date Last modified: Mon Aug 8 19:10:00 2005 ppessi
*
*/
#ifndef SU_ALLOC_H
......@@ -118,10 +115,10 @@ typedef struct nea_subnode_t {
unsigned sn_expires; /**< When subscription expires */
unsigned sn_latest; /**< Latest notification version */
unsigned sn_throttle; /**< Throttle value */
unsigned sn_version; /**< Version # by application */
unsigned sn_version; /**< Latest notified version # by application */
sip_time_t sn_notified; /**< When latest notify was sent */
sip_time_t sn_subscribed; /**< When first SUBSCRIBE was recv */
nea_event_view_t *sn_view; /**< Primary event view */
nea_event_view_t *sn_view; /**< Event view for this subscriber */
} nea_subnode_t;
/** Multiple content types per event. */
......@@ -224,13 +221,7 @@ int nea_server_update(nea_server_t *nes,
tag_value_t value,
...);
/** Add a new subscriber to existing notifier */
int nea_server_add(nea_server_t *nes,
sip_contact_t const *local_target,
msg_t *msg,
sip_t *sip);
/** Add a new subscriber to existing notifier. */
/** Add a new subscriber from subscribe transaction to an existing notifier. */
int nea_server_add_irq(nea_server_t *nes,
nta_leg_t *leg,
sip_contact_t const *local_target,
......
......@@ -1344,6 +1344,7 @@ int nes_watcher_callback(nea_server_t *nes,
/* ----------------------------------------------------------------- */
#if 0
/** Process incoming SUBSCRIBE message.
*
* The function nea_server_add() is called when the notifier receives a
......@@ -1378,23 +1379,16 @@ int nea_server_add(nea_server_t *nes,
*target = *local_target->m_url;
#if 1
s->s_leg = nta_leg_tcreate(nes->nes_agent, nea_sub_process_incoming, s,
SIPTAG_CALL_ID(sip->sip_call_id),
SIPTAG_FROM(sip->sip_to), /* local address */
SIPTAG_TO(sip->sip_from), /* remote address */
URLTAG_URL(target),
TAG_END());
#else
s->s_leg = nta_leg_stateful(nes->nes_agent, msg,
nea_sub_process_incoming, s,
URLTAG_URL(target),
TAG_NULL());
#endif
if (s->s_local && s->s_leg) {
nta_leg_tag(s->s_leg, NULL);
nta_leg_stateful(s->s_leg, msg);
irq =
return 0;
}
else {
......@@ -1402,6 +1396,7 @@ int nea_server_add(nea_server_t *nes,
return -1;
}
}
#endif
static
int nea_server_callback(nea_sub_t *nes_as_sub,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment