Commit a9416774 authored by Pekka Pessi's avatar Pekka Pessi

nta: changed type of NTATAG_SERVER_RPORT() back to signed int

Documented magic value 2 for server rport.

darcs-hash:20080723162257-db55f-2f8ae715a92026790d68e28d0c14f9b792edbe8e.gz
parent 4ab6937d
......@@ -987,7 +987,7 @@ int agent_set_params(nta_agent_t *agent, tagi_t *tags)
void *smime = agent->sa_smime;
uint32_t flags = agent->sa_flags;
int rport = agent->sa_rport;
unsigned server_rport = agent->sa_server_rport;
int server_rport = agent->sa_server_rport;
int tcp_rport = agent->sa_tcp_rport;
unsigned preload = agent->sa_preload;
unsigned threadpool = agent->sa_tport_threadpool;
......@@ -1178,6 +1178,8 @@ int agent_set_params(nta_agent_t *agent, tagi_t *tags)
if (server_rport > 2)
server_rport = 1;
else if (server_rport < 0)
server_rport = 1;
agent->sa_server_rport = server_rport;
agent->sa_bad_req_mask = bad_req_mask;
......@@ -1295,7 +1297,7 @@ int agent_get_params(nta_agent_t *agent, tagi_t *tags)
NTATAG_PRELOAD(agent->sa_preload),
NTATAG_PROGRESS(agent->sa_progress),
NTATAG_REL100(agent->sa_invite_100rel),
NTATAG_SERVER_RPORT(agent->sa_server_rport),
NTATAG_SERVER_RPORT((int)(agent->sa_server_rport)),
NTATAG_SIGCOMP_ALGORITHM(agent->sa_algorithm),
NTATAG_SIGCOMP_OPTIONS(agent->sa_sigcomp_options ?
agent->sa_sigcomp_options :
......
......@@ -1329,12 +1329,13 @@ tag_typedef_t ntatag_client_rport = BOOLTAG_TYPEDEF(client_rport);
* or false (zero or NULL pointer)
*
* @par Values
* - true - use "rport" parameter (default)
* - false - do not use "rport" parameterx
* - 2 - add "rport" parameter even if was not present in request
* - 1 - use "rport" parameter (default)
* - 0 - do not use "rport" parameter
*
* @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_TCP_RPORT(), @Via
*/
tag_typedef_t ntatag_server_rport = UINTTAG_TYPEDEF(server_rport);
tag_typedef_t ntatag_server_rport = INTTAG_TYPEDEF(server_rport);
/**@def NTATAG_TCP_RPORT(x)
......
......@@ -358,10 +358,10 @@ NTA_DLL extern tag_typedef_t ntatag_client_rport_ref;
#define NTATAG_RPORT_REF(x) ntatag_client_rport_ref, tag_bool_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_server_rport;
#define NTATAG_SERVER_RPORT(x) ntatag_server_rport, tag_uint_v((x))
#define NTATAG_SERVER_RPORT(x) ntatag_server_rport, tag_int_v((x))
NTA_DLL extern tag_typedef_t ntatag_server_rport_ref;
#define NTATAG_SERVER_RPORT_REF(x) ntatag_server_rport_ref, tag_uint_vr(&(x))
#define NTATAG_SERVER_RPORT_REF(x) ntatag_server_rport_ref, tag_int_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_tcp_rport;
#define NTATAG_TCP_RPORT(x) ntatag_tcp_rport, tag_bool_v((x))
......
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