Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-2-2
Commits
bd205274
Commit
bd205274
authored
Feb 11, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless parameter to net_Select
parent
40f97350
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
include/vlc_network.h
include/vlc_network.h
+2
-2
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+2
-3
src/network/io.c
src/network/io.c
+3
-10
No files found.
include/vlc_network.h
View file @
bd205274
...
@@ -120,8 +120,8 @@ VLC_EXPORT( int, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *,
...
@@ -120,8 +120,8 @@ VLC_EXPORT( int, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *,
#define net_ReadNonBlock(a,b,c,d,e,f) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e,f)
#define net_ReadNonBlock(a,b,c,d,e,f) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT
(
int
,
__net_ReadNonBlock
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
VLC_EXPORT
(
int
,
__net_ReadNonBlock
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
#define net_Select(a,b,c,d,e,f
,g) __net_Select(VLC_OBJECT(a),b,c,d,e,f,g
)
#define net_Select(a,b,c,d,e,f
) __net_Select(VLC_OBJECT(a),b,c,d,e,f
)
VLC_EXPORT
(
int
,
__net_Select
,
(
vlc_object_t
*
p_this
,
const
int
*
pi_fd
,
const
v_socket_t
*
const
*
,
int
i_fd
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
VLC_EXPORT
(
int
,
__net_Select
,
(
vlc_object_t
*
p_this
,
const
int
*
pi_fd
,
int
i_fd
,
uint8_t
*
p_data
,
int
i_data
,
mtime_t
i_wait
)
);
#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT
(
int
,
__net_Write
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
uint8_t
*
p_data
,
int
i_data
)
);
VLC_EXPORT
(
int
,
__net_Write
,
(
vlc_object_t
*
p_this
,
int
fd
,
const
v_socket_t
*
,
const
uint8_t
*
p_data
,
int
i_data
)
);
...
...
modules/services_discovery/sap.c
View file @
bd205274
...
@@ -524,7 +524,7 @@ static void Run( services_discovery_t *p_sd )
...
@@ -524,7 +524,7 @@ static void Run( services_discovery_t *p_sd )
int
i_read
;
int
i_read
;
uint8_t
p_buffer
[
MAX_SAP_BUFFER
+
1
];
uint8_t
p_buffer
[
MAX_SAP_BUFFER
+
1
];
i_read
=
net_Select
(
p_sd
,
p_sd
->
p_sys
->
pi_fd
,
NULL
,
i_read
=
net_Select
(
p_sd
,
p_sd
->
p_sys
->
pi_fd
,
p_sd
->
p_sys
->
i_fd
,
p_buffer
,
p_sd
->
p_sys
->
i_fd
,
p_buffer
,
MAX_SAP_BUFFER
,
500000
);
MAX_SAP_BUFFER
,
500000
);
...
@@ -658,13 +658,12 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
...
@@ -658,13 +658,12 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
int
newsize
=
Decompress
(
buf
,
&
decomp
,
end
-
buf
);
int
newsize
=
Decompress
(
buf
,
&
decomp
,
end
-
buf
);
if
(
newsize
<
0
)
if
(
newsize
<
0
)
{
{
msg_
Warn
(
p_sd
,
"decompression of sap
packet failed"
);
msg_
Dbg
(
p_sd
,
"decompression of SAP
packet failed"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
decomp
=
realloc
(
decomp
,
newsize
+
1
);
decomp
=
realloc
(
decomp
,
newsize
+
1
);
decomp
[
newsize
]
=
'\0'
;
decomp
[
newsize
]
=
'\0'
;
psz_sdp
=
(
const
char
*
)
decomp
;
psz_sdp
=
(
const
char
*
)
decomp
;
len
=
newsize
;
len
=
newsize
;
}
}
...
...
src/network/io.c
View file @
bd205274
...
@@ -464,21 +464,14 @@ int __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
...
@@ -464,21 +464,14 @@ int __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
* that has some.
* that has some.
*****************************************************************************/
*****************************************************************************/
int
__net_Select
(
vlc_object_t
*
restrict
p_this
,
const
int
*
restrict
pi_fd
,
int
__net_Select
(
vlc_object_t
*
restrict
p_this
,
const
int
*
restrict
pi_fd
,
const
v_socket_t
*
const
*
restrict
pp_vs
,
int
i_fd
,
uint8_t
*
restrict
p_data
,
int
i_data
,
int
i_fd
,
uint8_t
*
restrict
p_data
,
int
i_data
,
mtime_t
i_wait
)
mtime_t
i_wait
)
{
{
if
(
pp_vs
==
NULL
)
{
const
v_socket_t
*
vsv
[
i_fd
];
const
v_socket_t
*
vsv
[
i_fd
];
memset
(
vsv
,
0
,
sizeof
(
vsv
)
);
memset
(
vsv
,
0
,
sizeof
(
vsv
)
);
return
net_ReadInner
(
p_this
,
i_fd
,
pi_fd
,
vsv
,
p_data
,
i_data
,
return
net_ReadInner
(
p_this
,
i_fd
,
pi_fd
,
vsv
,
p_data
,
i_data
,
i_wait
/
1000
,
VLC_FALSE
);
i_wait
/
1000
,
VLC_FALSE
);
}
return
net_ReadInner
(
p_this
,
i_fd
,
pi_fd
,
pp_vs
,
p_data
,
i_data
,
i_wait
/
1000
,
VLC_FALSE
);
}
}
...
...
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