Rémi Denis-Courmont
8d03dee93c
Use MSG_NOSIGNAL in send()/sendto()/sendmsg()
This avoids SIGPIPE firing when writing to a remote-closed connection-
oriented socket (it is useless for datagram sockets or on Windows
though). SIGPIPE is blocked ins VLC, but not necessarily in LibVLC.
The problem remains for write() on broken pipe and sockets.
11 years ago
Hannes Domani
a916d7be15
lua: reactivate vlclua_net_poll() on windows
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
12 years ago
Hannes Domani
7d20cc0edf
lua: never change index of lua file descriptors
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
12 years ago
Rémi Denis-Courmont
1908e010c2
lua: do not pass -1 to read/write/recv/send
12 years ago
Rémi Denis-Courmont
13cb1f0e20
lua: dead code
12 years ago
Rémi Denis-Courmont
bfe17fd33e
lua: vector out files descriptable table code
12 years ago
Rémi Denis-Courmont
ee0b9164f9
vlc_readdir: remove string duplication, simplify
12 years ago
Rémi Denis-Courmont
d35df2cf43
lua: small macro factorization
13 years ago
Rémi Denis-Courmont
11ffab8a59
lua: separate generic and interface-specific net functions
13 years ago
Rémi Duraffort
5f74c08bea
Lua: Fix memory leak (cid #1100856 )
13 years ago
Rémi Denis-Courmont
ca9b8b45c7
Lua intf: allocate file descriptor table dynamically
13 years ago
Rémi Denis-Courmont
32f0051a02
Lua: sanitize events passed to poll()
13 years ago
Rémi Denis-Courmont
f06dd9a263
Lua: remap file descriptors in Lua and GC at exit ( fixes #8898 )
13 years ago
Rémi Denis-Courmont
deb38e43ec
Lua: disable net.(poll|read|write) on Windows and document
These functions assume that sockets are file descriptors, never worked
properly on Windows. See also 3841c08590 .
13 years ago
Rémi Denis-Courmont
2e68de7297
lua: raise an erro from net.poll() when quitting
This forces Lua RC to exit cleanly in all cases.
13 years ago
Rémi Denis-Courmont
80fc185b2e
lua: remove no-op
13 years ago
Rémi Denis-Courmont
3d2bd907e8
lua: fix potential busy loop in net.poll()
13 years ago
Rafaël Carré
6d53362001
Use _WIN32 rather than WIN32 (same for WIN64)
http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx only
mentions the _ prefixed variable.
gcc will always define the _ prefixed variable, like Visual Studio.
The prefixless one is defined in some language standards, e.g. gnu99
but not c99.
13 years ago
Antoine Cellerier
ea6dc345a8
Remove select timeout.
console and socket mode are now exclusive on windows.
14 years ago
Antoine Cellerier
642959ea07
Add lua console handling code for windows.
This fixes the lua command line interface under windows. Adding all
those special cases in the host abstraction layer doesn't seem optimal
but at least it works. I'll probably try cleaning it up later.
14 years ago
Rémi Denis-Courmont
75d005cf30
Remove inconsistently used check for <sys/stat.h>
14 years ago
Rémi Denis-Courmont
032a234740
Include system headers before VLC headers
This fixes some problems when the system or VLC play evil tricks with
the preprocessor. (Only files including sys/stat.h are concerned with
this commit. I did not fix all files.)
14 years ago
Kelly Anderson
c0f44d25b3
Consolidate lua includes in vlc.h
So lua 5.2 compatibility declarations can be made in one place.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
14 years ago
Rafaël Carré
f52a83cced
vlclua_net_recv() : do like [ b0d7c77b1] did for vlclua_fd_read()
15 years ago
Rémi Duraffort
b0d7c77b11
lua: return nil when the stream or file ends ( fix #4876 )
15 years ago
Jean-Baptiste Kempf
61147a769e
Move /modules/misc/lua/ to /modules/lua
Lua is an important part of VLC and abusing misc has gone a bit too far...
15 years ago
Rémi Denis-Courmont
314c242ab0
LUA: hide EINTR from scripts and remove the timeout feature
Timeout makes it too easy to write crappy code.
It's also much easier to handle EINTR without timeout.
This fixes a minor bug: revents was undefined if poll() failed.
15 years ago
Jean-Baptiste Kempf
9d34c9bb90
Win32: fix lua compilation
16 years ago
Rafaël Carré
087442fc1e
lua/net.c: revert [ 14707cbaca] and fix properly
Always return 1 argument, but avoid pushing 0xffffffff bytes on the stack
Also fix vlclua_fd_read()
16 years ago
Srikanth Raju
14707cbaca
Lua: Avoid segmentation fault on recv() fail
Signed-off-by: Jean-Philippe André <jpeg@videolan.org>
16 years ago
Srikanth Raju
2bb90c75be
Lua: Implement net.connect_tcp
Signed-off-by: Jean-Philippe André <jpeg@videolan.org>
16 years ago
Antoine Cellerier
f782f86eb4
Use pushliteral instead of pushstring where possible. Saves a strlen call.
16 years ago
Rémi Denis-Courmont
7e45ab1b28
utf8_* -> vlc_* (sed roxxors)
16 years ago
Rémi Denis-Courmont
d601e4ed29
Split file path functions out of vlc_charset.h into vlc_fs.h
16 years ago
Antoine Cellerier
1a14e10951
Fix lua intf thread cancellation and cleanup properly in vlc.net.poll().
16 years ago
Rémi Denis-Courmont
a52793e924
Remove useless <sys/stat.h> includes
16 years ago
Antoine Cellerier
5ac9e88e16
Remove vlc.net.select() and fd_set.
16 years ago
Antoine Cellerier
5f5d779420
Remove timeout parameter from lua listner:accept().
16 years ago
Antoine Cellerier
7ef39293b6
Remove linux specific poll flag.
16 years ago
Antoine Cellerier
8bbd4a3154
Add vlc.net.poll() and use in modules/host.lua.
16 years ago
Antoine Cellerier
a9872d2d70
Remove use of select/poll timeouts in lua rc and telnet interfaces.
16 years ago
Antoine Cellerier
28e52ddb9b
Add --data-path option. Access the src share directory now works from build tree.
17 years ago
Antoine Cellerier
8241e58419
Fix blocking/non-blocking accept in lua interface.
17 years ago
Rémi Denis-Courmont
84e1b303e3
net_Accept: remove timeout parameter
Only the RC interface still used it, and it was not really needed
(net_Accept() returns -1 when the object is killed).
17 years ago
Antoine Cellerier
66bffcc5a3
Update lua intf scripts to new API (untested).
18 years ago
Antoine Cellerier
95addd5738
Implement Lua objects in the C code directly. Fix most type checks. Move every thing arround.
18 years ago
Rémi Denis-Courmont
3561b9b28f
Plugins: include vlc_common.h directly instead of vlc/vlc.h
18 years ago
Rémi Denis-Courmont
04aae4db17
No need to do stat() before opendir()!
18 years ago
Rafaël Carré
94a6747034
misc: fix warnings
declare unused parameters in callbacks as void
use size_t
xml/xtag.c: comment dead code
freetype: use mdate() instead of time(), remove unused parameter from UnderlineGlyphYUVA()
notify/growl: factorize NotifyGrowl()
18 years ago
Rémi Denis-Courmont
99fab9089e
Don't include config.h from the headers - refs #297 .
Missing some cases that I could not test.
Also ffmpeg/chroma.c is locked, so I can but leave it broken.
Fix is for the remaining modules is obvious and the issue is easy to detect.
18 years ago