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
8c014b0b
Commit
8c014b0b
authored
Mar 13, 2007
by
Dafydd Harries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use one RNG per agent
darcs-hash:20070313171803-c9803-70fea1434bb7bf49145812c7d1797c23fd052151.gz
parent
29db0956
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
agent/agent.c
agent/agent.c
+6
-6
agent/agent.h
agent/agent.h
+2
-0
No files found.
agent/agent.c
View file @
8c014b0b
...
...
@@ -7,7 +7,6 @@
#include "stun.h"
#include "udp.h"
#include "random.h"
#include "agent.h"
#include "agent-signals-marshal.h"
...
...
@@ -293,6 +292,7 @@ nice_agent_init (NiceAgent *agent)
{
agent
->
next_candidate_id
=
1
;
agent
->
next_stream_id
=
1
;
agent
->
rng
=
nice_rng_new
();
}
...
...
@@ -368,7 +368,6 @@ nice_agent_add_local_host_candidate (
guint
component_id
,
NiceAddress
*
address
)
{
NiceRNG
*
rng
;
NiceCandidate
*
candidate
;
Component
*
component
;
...
...
@@ -385,10 +384,8 @@ nice_agent_add_local_host_candidate (
candidate
);
/* generate username/password */
rng
=
nice_rng_new
();
nice_rng_generate_bytes_print
(
rng
,
8
,
candidate
->
username
);
nice_rng_generate_bytes_print
(
rng
,
8
,
candidate
->
password
);
nice_rng_free
(
rng
);
nice_rng_generate_bytes_print
(
agent
->
rng
,
8
,
candidate
->
username
);
nice_rng_generate_bytes_print
(
agent
->
rng
,
8
,
candidate
->
password
);
/* allocate socket */
/* XXX: handle error */
...
...
@@ -1213,6 +1210,9 @@ nice_agent_dispose (GObject *object)
g_free
(
agent
->
stun_server
);
agent
->
stun_server
=
NULL
;
nice_rng_free
(
agent
->
rng
);
agent
->
rng
=
NULL
;
if
(
G_OBJECT_CLASS
(
nice_agent_parent_class
)
->
dispose
)
G_OBJECT_CLASS
(
nice_agent_parent_class
)
->
dispose
(
object
);
}
...
...
agent/agent.h
View file @
8c014b0b
...
...
@@ -7,6 +7,7 @@
#include "udp.h"
#include "address.h"
#include "candidate.h"
#include "random.h"
G_BEGIN_DECLS
...
...
@@ -58,6 +59,7 @@ struct _NiceAgent
NiceAgentRecvFunc
read_func
;
gpointer
read_func_data
;
gchar
*
stun_server
;
NiceRNG
*
rng
;
};
typedef
struct
_NiceAgentClass
NiceAgentClass
;
...
...
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