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
b7fb6f30
Commit
b7fb6f30
authored
Jan 03, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Use one struct for data and buffer
parent
08964676
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
tests/test-pseudotcp.c
tests/test-pseudotcp.c
+3
-4
No files found.
tests/test-pseudotcp.c
View file @
b7fb6f30
...
...
@@ -155,8 +155,8 @@ static void closed (PseudoTcpSocket *sock, guint32 err, gpointer data)
struct
notify_data
{
PseudoTcpSocket
*
sock
;
gchar
*
buffer
;
guint32
len
;
gchar
buffer
[];
};
static
gboolean
notify_packet
(
gpointer
user_data
)
...
...
@@ -166,7 +166,7 @@ static gboolean notify_packet (gpointer user_data)
return
FALSE
;
pseudo_tcp_socket_notify_packet
(
data
->
sock
,
data
->
buffer
,
data
->
len
);
adjust_clock
(
data
->
sock
);
g_free
(
data
->
buffer
);
g_free
(
data
);
return
FALSE
;
}
...
...
@@ -184,11 +184,10 @@ static PseudoTcpWriteResult write (PseudoTcpSocket *sock,
return
WR_SUCCESS
;
}
data
=
g_
new0
(
struct
notify_data
,
1
);
data
=
g_
malloc
(
sizeof
(
struct
notify_data
)
+
len
);
g_debug
(
"Socket %p(%d) Writing : %d bytes"
,
sock
,
state
,
len
);
data
->
buffer
=
g_malloc
(
len
);
memcpy
(
data
->
buffer
,
buffer
,
len
);
data
->
len
=
len
;
...
...
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