Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
949754b1
Commit
949754b1
authored
May 02, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gtalk compat (partially) by not sending non-username attributes
parent
1e2acd57
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
30 deletions
+35
-30
agent/conncheck.c
agent/conncheck.c
+2
-1
stun/bind.c
stun/bind.c
+19
-17
stun/stunsend.c
stun/stunsend.c
+14
-12
No files found.
agent/conncheck.c
View file @
949754b1
...
...
@@ -1590,7 +1590,8 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream, Compo
stun_conncheck_use_candidate
((
const
uint8_t
*
)
buf
);
uint32_t
priority
=
stun_conncheck_priority
((
const
uint8_t
*
)
buf
);
if
(
agent
->
controlling_mode
)
if
(
agent
->
controlling_mode
||
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
)
use_candidate
=
TRUE
;
if
(
stream
->
initial_binding_request_received
!=
TRUE
)
...
...
stun/bind.c
View file @
949754b1
...
...
@@ -287,28 +287,30 @@ stun_conncheck_start (stun_bind_t **restrict context, int fd,
memcpy
(
ctx
->
trans
.
key
.
value
,
password
,
ctx
->
trans
.
key
.
length
);
}
if
(
cand_use
)
{
val
=
stun_append_flag
(
ctx
->
trans
.
msg
.
buf
,
sizeof
(
ctx
->
trans
.
msg
.
buf
),
STUN_USE_CANDIDATE
);
if
(
compat
!=
1
)
{
if
(
cand_use
)
{
val
=
stun_append_flag
(
ctx
->
trans
.
msg
.
buf
,
sizeof
(
ctx
->
trans
.
msg
.
buf
),
STUN_USE_CANDIDATE
);
if
(
val
)
goto
error
;
}
val
=
stun_append32
(
ctx
->
trans
.
msg
.
buf
,
sizeof
(
ctx
->
trans
.
msg
.
buf
),
STUN_PRIORITY
,
priority
);
if
(
val
)
goto
error
;
}
val
=
stun_append32
(
ctx
->
trans
.
msg
.
buf
,
sizeof
(
ctx
->
trans
.
msg
.
buf
),
STUN_PRIORITY
,
priority
);
if
(
val
)
goto
error
;
val
=
stun_append64
(
ctx
->
trans
.
msg
.
buf
,
sizeof
(
ctx
->
trans
.
msg
.
buf
),
controlling
?
STUN_ICE_CONTROLLING
:
STUN_ICE_CONTROLLED
,
tie
);
if
(
val
)
goto
error
;
val
=
stun_append64
(
ctx
->
trans
.
msg
.
buf
,
sizeof
(
ctx
->
trans
.
msg
.
buf
),
controlling
?
STUN_ICE_CONTROLLING
:
STUN_ICE_CONTROLLED
,
tie
);
if
(
val
)
goto
error
;
}
val
=
stun_finish_short
(
ctx
->
trans
.
msg
.
buf
,
&
ctx
->
trans
.
msg
.
length
,
username
,
password
,
NULL
);
username
,
compat
==
1
?
NULL
:
password
,
NULL
);
if
(
val
)
goto
error
;
...
...
stun/stunsend.c
View file @
949754b1
...
...
@@ -490,22 +490,24 @@ stun_finish_long (uint8_t *msg, size_t *restrict plen,
DBG
(
"
\n
sent : "
);
DBG_bytes
(
ptr
,
20
);
DBG
(
"
\n
"
);
}
/*
* NOTE: we always add a FINGERPRINT, even when it's not needed.
* This is OK, as it is an optional attribute. It also makes my
* software engineer's life easier.
*/
ptr
=
stun_append
(
msg
,
len
,
STUN_FINGERPRINT
,
4
);
if
(
ptr
==
NULL
)
return
ENOBUFS
;
}
*
plen
=
ptr
+
4
-
msg
;
if
(
0
)
{
/*
* NOTE: we always add a FINGERPRINT, even when it's not needed.
* This is OK, as it is an optional attribute. It also makes my
* software engineer's life easier.
*/
ptr
=
stun_append
(
msg
,
len
,
STUN_FINGERPRINT
,
4
);
if
(
ptr
==
NULL
)
return
ENOBUFS
;
fpr
=
htonl
(
stun_fingerprint
(
msg
,
*
plen
));
memcpy
(
ptr
,
&
fpr
,
sizeof
(
fpr
));
fpr
=
htonl
(
stun_fingerprint
(
msg
,
*
plen
));
memcpy
(
ptr
,
&
fpr
,
sizeof
(
fpr
));
}
*
plen
=
stun_length
(
msg
)
+
20
;
return
0
;
}
...
...
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