Commit 565acce1 authored by Michael Jerris's avatar Michael Jerris

initial register nua handling

darcs-hash:20060926180058-16063-cc9aa739e31bddd35cd7011e91b6ef62691123bf.gz
parent 4d6710d0
......@@ -297,6 +297,7 @@ char const *nua_callstate_name(enum nua_callstate state)
case nua_callstate_ready: return "ready";
case nua_callstate_terminating: return "terminating";
case nua_callstate_terminated: return "terminated";
case nua_i_register: return "nua_i_register";
default: return "UNKNOWN";
}
}
......@@ -2233,6 +2233,27 @@ int nua_stack_process_info(nua_t *nua,
}
/* ======================================================================== */
/* REGISTER */
int nua_stack_process_register(nua_t *nua,
nua_handle_t *nh,
nta_incoming_t *irq,
sip_t const *sip)
{
if (nh == NULL)
if (!(nh = nua_stack_incoming_handle(nua, irq, sip, nh_has_nothing, 0)))
return 500; /* Respond with 500 Internal Server Error */
nua_stack_event(nh->nh_nua, nh, nta_incoming_getrequest(irq),
nua_i_register, SIP_200_OK, TAG_END());
return 0;
}
/* ======================================================================== */
/* UPDATE */
......
......@@ -1645,6 +1645,9 @@ int nua_stack_process_request(nua_handle_t *nh,
case sip_method_subscribe:
return nua_stack_process_subscribe(nua, nh, irq, sip);
case sip_method_register:
return nua_stack_process_register(nua, nh, irq, sip);
case sip_method_options:
return nua_stack_process_options(nua, nh, irq, sip);
......
......@@ -508,6 +508,7 @@ nua_stack_process_request_t nua_stack_process_subscribe;
nua_stack_process_request_t nua_stack_process_notify;
nua_stack_process_request_t nua_stack_process_refer;
nua_stack_process_request_t nua_stack_process_unknown;
nua_stack_process_request_t nua_stack_process_register;
#ifndef SDP_MIME_TYPE
#define SDP_MIME_TYPE nua_application_sdp
......
......@@ -149,10 +149,6 @@ typedef enum nua_event_e {
compatibility! */
nua_i_network_changed, /**< Local IP(v6) address has changed */
/* Event used by stack internally */
nua_i_none
} nua_event_t;
typedef struct event_s {
......
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