Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
bd205274
Commit
bd205274
authored
Feb 11, 2007
by
Rémi Denis-Courmont
Browse files
Remove useless parameter to net_Select
parent
40f97350
Changes
3
Hide whitespace changes
Inline
Side-by-side
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 *,
#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
)
);
#define net_Select(a,b,c,d,e,f
,g
) __net_Select(VLC_OBJECT(a),b,c,d,e,f
,g
)
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
)
);
#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
,
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)
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 )
int
i_read
;
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
,
MAX_SAP_BUFFER
,
500000
);
...
...
@@ -658,13 +658,12 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
int
newsize
=
Decompress
(
buf
,
&
decomp
,
end
-
buf
);
if
(
newsize
<
0
)
{
msg_
Warn
(
p_sd
,
"decompression of
sap
packet failed"
);
msg_
Dbg
(
p_sd
,
"decompression of
SAP
packet failed"
);
return
VLC_EGENERIC
;
}
decomp
=
realloc
(
decomp
,
newsize
+
1
);
decomp
[
newsize
]
=
'\0'
;
psz_sdp
=
(
const
char
*
)
decomp
;
len
=
newsize
;
}
...
...
src/network/io.c
View file @
bd205274
...
...
@@ -464,20 +464,13 @@ int __net_ReadNonBlock( vlc_object_t *restrict p_this, int fd,
* that has some.
*****************************************************************************/
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
,
mtime_t
i_wait
)
{
if
(
pp_vs
==
NULL
)
{
const
v_socket_t
*
vsv
[
i_fd
];
memset
(
vsv
,
0
,
sizeof
(
vsv
)
);
return
net_ReadInner
(
p_this
,
i_fd
,
pi_fd
,
vsv
,
p_data
,
i_data
,
i_wait
/
1000
,
VLC_FALSE
);
}
const
v_socket_t
*
vsv
[
i_fd
];
memset
(
vsv
,
0
,
sizeof
(
vsv
)
);
return
net_ReadInner
(
p_this
,
i_fd
,
pi_fd
,
pp_
vs
,
p_data
,
i_data
,
return
net_ReadInner
(
p_this
,
i_fd
,
pi_fd
,
vs
v
,
p_data
,
i_data
,
i_wait
/
1000
,
VLC_FALSE
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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