Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
20d93dce
Commit
20d93dce
authored
Jun 30, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrappers for shutdown() API
parent
d8bdb697
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
include/network.h
include/network.h
+3
-0
include/vlc_symbols.h
include/vlc_symbols.h
+6
-0
src/misc/net.c
src/misc/net.c
+33
-0
No files found.
include/network.h
View file @
20d93dce
...
...
@@ -343,6 +343,9 @@ VLC_EXPORT( int, net_Printf, ( vlc_object_t *p_this, int fd, v_socket_t *, const
#define net_vaPrintf(a,b,c,d,e) __net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
VLC_EXPORT
(
int
,
__net_vaPrintf
,
(
vlc_object_t
*
p_this
,
int
fd
,
v_socket_t
*
,
const
char
*
psz_fmt
,
va_list
args
)
);
VLC_EXPORT
(
int
,
net_StopRecv
,
(
int
fd
)
);
VLC_EXPORT
(
int
,
net_StopSend
,
(
int
fd
)
);
#define net_CheckIP(a,b,c,d) __net_CheckIP(VLC_OBJECT(a),b,c,d)
VLC_EXPORT
(
int
,
__net_CheckIP
,
(
vlc_object_t
*
p_this
,
char
*
psz_ip
,
char
**
ppsz_hosts
,
int
i_hosts
)
);
...
...
include/vlc_symbols.h
View file @
20d93dce
...
...
@@ -376,6 +376,8 @@ struct module_symbols_t
void
(
*
net_ListenClose_inner
)
(
int
*
fd
);
void
(
*
DigestMD5_inner
)
(
struct
md5_s
*
,
uint32_t
*
);
int
(
*
__net_CheckIP_inner
)
(
vlc_object_t
*
p_this
,
char
*
psz_ip
,
char
**
ppsz_hosts
,
int
i_hosts
);
int
(
*
net_StopSend_inner
)
(
int
fd
);
int
(
*
net_StopRecv_inner
)
(
int
fd
);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...
...
@@ -737,6 +739,8 @@ struct module_symbols_t
# define net_ListenClose (p_symbols)->net_ListenClose_inner
# define DigestMD5 (p_symbols)->DigestMD5_inner
# define __net_CheckIP (p_symbols)->__net_CheckIP_inner
# define net_StopSend (p_symbols)->net_StopSend_inner
# define net_StopRecv (p_symbols)->net_StopRecv_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...
...
@@ -1101,6 +1105,8 @@ struct module_symbols_t
((p_symbols)->net_ListenClose_inner) = net_ListenClose; \
((p_symbols)->DigestMD5_inner) = DigestMD5; \
((p_symbols)->__net_CheckIP_inner) = __net_CheckIP; \
((p_symbols)->net_StopSend_inner) = net_StopSend; \
((p_symbols)->net_StopRecv_inner) = net_StopRecv; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
# endif
/* __PLUGIN__ */
...
...
src/misc/net.c
View file @
20d93dce
...
...
@@ -1177,6 +1177,39 @@ static int SocksHandshakeTCP( vlc_object_t *p_obj,
return
VLC_SUCCESS
;
}
/*****************************************************************************
* net_StopRecv/Send
*****************************************************************************
* Wrappers for shutdown()
*****************************************************************************/
int
net_StopRecv
(
int
fd
)
{
#if defined (SHUT_RD)
/* the standard way */
return
shutdown
(
fd
,
SHUT_RD
);
#elif defined (SD_RECEIVE)
/* the Microsoft seemingly-purposedly-different-for-the-sake-of-it way */
return
shutdown
(
fd
,
SD_RECEIVE
);
#else
# warning FIXME: implement shutdown on your platform!
return
-
1
;
#endif
}
int
net_StopSend
(
int
fd
)
{
#if defined (SHUT_WR)
/* the standard way */
return
shutdown
(
fd
,
SHUT_WR
);
#elif defined (SD_SEND)
/* the Microsoft seemingly-purposedly-different-for-the-sake-of-it way */
return
shutdown
(
fd
,
SD_SEND
);
#else
# warning FIXME: implement shutdown on your platform!
return
-
1
;
#endif
}
/*****************************************************************************
* __net_CheckIP
*****************************************************************************
...
...
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