Commit 079445bf authored by jehan's avatar jehan
Browse files

uri port is int instead of uint

parent e5416ab8
...@@ -61,7 +61,7 @@ typedef struct _belle_sip_uri belle_sip_uri_t; ...@@ -61,7 +61,7 @@ typedef struct _belle_sip_uri belle_sip_uri_t;
* Returns the port part of this SipURI. * Returns the port part of this SipURI.
* *
*/ */
BELLESIP_EXPORT unsigned int belle_sip_uri_get_port(const belle_sip_uri_t* uri) ; BELLESIP_EXPORT int belle_sip_uri_get_port(const belle_sip_uri_t* uri) ;
/** /**
* Returns the port of the uri, if not specified in the uri returns the well known port according to the transport. * Returns the port of the uri, if not specified in the uri returns the well known port according to the transport.
**/ **/
...@@ -136,7 +136,7 @@ typedef struct _belle_sip_uri belle_sip_uri_t; ...@@ -136,7 +136,7 @@ typedef struct _belle_sip_uri belle_sip_uri_t;
* Set the port part of this SipURI to the newly supplied port parameter. * Set the port part of this SipURI to the newly supplied port parameter.
* *
*/ */
BELLESIP_EXPORT void belle_sip_uri_set_port(belle_sip_uri_t* uri,unsigned int port) ; BELLESIP_EXPORT void belle_sip_uri_set_port(belle_sip_uri_t* uri, int port) ;
/** /**
* Sets the scheme of this URI to sip or sips depending on whether the argument is true or false. * Sets the scheme of this URI to sip or sips depending on whether the argument is true or false.
* *
......
...@@ -47,7 +47,7 @@ struct _belle_sip_uri { ...@@ -47,7 +47,7 @@ struct _belle_sip_uri {
unsigned int secure; unsigned int secure;
char* user; char* user;
char* host; char* host;
unsigned int port; int port;
belle_sip_parameters_t * header_list; belle_sip_parameters_t * header_list;
}; };
...@@ -154,7 +154,7 @@ SIP_URI_GET_SET_BOOL(secure) ...@@ -154,7 +154,7 @@ SIP_URI_GET_SET_BOOL(secure)
SIP_URI_GET_SET_STRING(user) SIP_URI_GET_SET_STRING(user)
SIP_URI_GET_SET_STRING(host) SIP_URI_GET_SET_STRING(host)
SIP_URI_GET_SET_UINT(port) SIP_URI_GET_SET_INT(port)
SIP_URI_GET_SET_STRING_PARAM(transport) SIP_URI_GET_SET_STRING_PARAM(transport)
SIP_URI_GET_SET_STRING_PARAM(user) SIP_URI_GET_SET_STRING_PARAM(user)
......
...@@ -252,7 +252,7 @@ static void channel_on_sending(belle_sip_channel_listener_t *obj, belle_sip_chan ...@@ -252,7 +252,7 @@ static void channel_on_sending(belle_sip_channel_listener_t *obj, belle_sip_chan
if (belle_sip_uri_get_transport_param(contact_uri) == NULL && strcasecmp("udp",belle_sip_channel_get_transport_name(chan))!=0) { if (belle_sip_uri_get_transport_param(contact_uri) == NULL && strcasecmp("udp",belle_sip_channel_get_transport_name(chan))!=0) {
belle_sip_uri_set_transport_param(contact_uri,belle_sip_channel_get_transport_name_lower_case(chan)); belle_sip_uri_set_transport_param(contact_uri,belle_sip_channel_get_transport_name_lower_case(chan));
} }
if (belle_sip_uri_get_port(contact_uri) == 0 && chan->local_port!=5060) { if (belle_sip_uri_get_port(contact_uri) <= 0 && chan->local_port!=5060) {
belle_sip_uri_set_port(contact_uri,chan->local_port); belle_sip_uri_set_port(contact_uri,chan->local_port);
} }
} }
......
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