Wed Jul 23 12:22:57 EDT 2008 Pekka Pessi <first.last@nokia.com>

* nta: changed type of NTATAG_SERVER_RPORT() back to signed int
  
  Documented magic value 2 for server rport.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9267 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-08-12 17:03:42 +00:00
parent 661fc8232c
commit 4acc6a79af
4 changed files with 11 additions and 8 deletions

View File

@ -1 +1 @@
Tue Aug 12 13:02:56 EDT 2008
Tue Aug 12 13:03:36 EDT 2008

View File

@ -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 :

View File

@ -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)

View File

@ -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))