diff options
author | phintuka <phintuka> | 2006-09-20 06:57:00 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2006-09-20 06:57:00 +0000 |
commit | 2591452ed85bda1e381e1de972e602cd29279feb (patch) | |
tree | 954179f1237d8460410836ea4dedf885c4c00e5b /tools/cxsocket.h | |
parent | 68bdd9a5636123e53c70cf15d3f0ed016899331b (diff) | |
download | xineliboutput-2591452ed85bda1e381e1de972e602cd29279feb.tar.gz xineliboutput-2591452ed85bda1e381e1de972e602cd29279feb.tar.bz2 |
Optional size for write_cmd
Diffstat (limited to 'tools/cxsocket.h')
-rw-r--r-- | tools/cxsocket.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/cxsocket.h b/tools/cxsocket.h index bbc647b7..8080f3ab 100644 --- a/tools/cxsocket.h +++ b/tools/cxsocket.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: cxsocket.h,v 1.9 2006-09-19 09:50:47 phintuka Exp $ + * $Id: cxsocket.h,v 1.10 2006-09-20 06:57:00 phintuka Exp $ * */ @@ -222,14 +222,14 @@ static inline int write_osd_command(int fd, osd_command_t *cmd) return 1; } -static inline ssize_t write_str(int fd, const char *str, int timeout_ms=-1) +static inline ssize_t write_str(int fd, const char *str, int timeout_ms=-1, int len=0) { - return timed_write(fd, str, strlen(str), timeout_ms); + return timed_write(fd, str, len ? : strlen(str), timeout_ms); } -static inline ssize_t write_cmd(int fd, const char *str) +static inline ssize_t write_cmd(int fd, const char *str, int len=0) { - return write_str(fd, str, 10); + return write_str(fd, str, 10, len); } static inline int udp_discovery_broadcast(int fd_discovery, int m_Port) |