Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
e6b7360a
Commit
e6b7360a
authored
Jan 06, 2014
by
Simon Morlat
Browse files
don't use AI_V4MAPPED for AF_INET
parent
eff42770
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/belle-sip/provider.h
View file @
e6b7360a
...
...
@@ -26,7 +26,7 @@ BELLE_SIP_BEGIN_DECLS
BELLESIP_EXPORT
belle_sip_uri_t
*
belles_sip_provider_find_our_origin
(
belle_sip_provider_t
*
p
,
belle_sip_request_t
*
req
);
BELLESIP_EXPORT
unsigned
char
belle_sip_provider_is_us
(
belle_sip_provider_t
*
p
,
belle_sip_uri_t
*
);
BELLESIP_EXPORT
int
belle_sip_provider_is_us
(
belle_sip_provider_t
*
p
,
belle_sip_uri_t
*
);
BELLESIP_EXPORT
int
belle_sip_provider_add_listening_point
(
belle_sip_provider_t
*
p
,
belle_sip_listening_point_t
*
lp
);
...
...
src/listeningpoint.c
View file @
e6b7360a
...
...
@@ -148,7 +148,8 @@ belle_sip_channel_t *belle_sip_listening_point_get_channel(belle_sip_listening_p
belle_sip_channel_t
*
chan
;
hints
.
ai_family
=
lp
->
ai_family
;
hints
.
ai_flags
=
AI_NUMERICHOST
|
AI_NUMERICSERV
|
AI_V4MAPPED
;
hints
.
ai_flags
=
AI_NUMERICHOST
|
AI_NUMERICSERV
;
if
(
hints
.
ai_family
==
AF_INET6
)
hints
.
ai_flags
|=
AI_V4MAPPED
;
snprintf
(
portstr
,
sizeof
(
portstr
),
"%i"
,
hop
->
port
);
getaddrinfo
(
hop
->
host
,
portstr
,
&
hints
,
&
res
);
chan
=
_belle_sip_listening_point_get_channel
(
lp
,
hop
,
res
);
...
...
src/provider.c
View file @
e6b7360a
...
...
@@ -445,13 +445,15 @@ belle_sip_provider_t *belle_sip_provider_new(belle_sip_stack_t *s, belle_sip_lis
if
(
lp
)
belle_sip_provider_add_listening_point
(
p
,
lp
);
return
p
;
}
#if 0
/* what is the purpose of this function incorrectly named ?*/
belle_sip_uri_t *belles_sip_provider_find_our_origin(belle_sip_provider_t *p, belle_sip_request_t *req) {
belle_sip_uri_t* origin = belle_sip_request_extract_origin(req);
belle_sip_hop_t *hop = belle_sip_hop_new_from_uri(origin);
belle_sip_channel_t *inChan = belle_sip_provider_get_channel(p, hop);
return compute_our_external_uri_from_channel(inChan);
}
#endif
static
belle_sip_channel_t
*
_belle_sip_provider_find_channel_with_us
(
belle_sip_provider_t
*
p
,
belle_sip_uri_t
*
uri
)
{
const
char
*
transport
;
...
...
@@ -478,7 +480,7 @@ static belle_sip_channel_t* _belle_sip_provider_find_channel_with_us(belle_sip_p
return
NULL
;
}
unsigned
char
belle_sip_provider_is_us
(
belle_sip_provider_t
*
p
,
belle_sip_uri_t
*
uri
)
{
int
belle_sip_provider_is_us
(
belle_sip_provider_t
*
p
,
belle_sip_uri_t
*
uri
)
{
belle_sip_channel_t
*
chan
=
_belle_sip_provider_find_channel_with_us
(
p
,
uri
);
return
!!
chan
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment