diff options
author | Christian Pointner <equinox@spreadspace.org> | 2011-06-08 21:37:18 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2011-06-08 21:37:18 +0000 |
commit | 4aeee54092e168c357a04fa7244227980f372c92 (patch) | |
tree | a7e9db938ebc0603196e13fa61a6da333d377322 | |
parent | added tcp server init (diff) |
fixed error output
-rw-r--r-- | src/streamer.c | 8 | ||||
-rw-r--r-- | src/streamer.h | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/streamer.c b/src/streamer.c index 82cb0f4..8f79c1e 100644 --- a/src/streamer.c +++ b/src/streamer.c @@ -66,7 +66,7 @@ int init_server(const char* host, const char* port) { int server = socket(AF_INET, SOCK_STREAM, 0); if(server < 0) { - perror("streamer: socket() call failed"); + log_printf(ERROR, "streamer: socket() call failed"); return -1; } @@ -79,12 +79,12 @@ int init_server(const char* host, const char* port) local_addr.sin_addr.s_addr = htonl(INADDR_ANY); if(bind(server, (struct sockaddr *)&local_addr, sizeof(local_addr))==-1) { - perror("streamer: bind() call failed"); + log_printf(ERROR, "streamer: bind() call failed"); return -1; } if(listen(server, 5)==-1) { - perror("streamer: listen() call failed"); + log_printf(ERROR, "streamer: listen() call failed"); return -1; } @@ -96,8 +96,6 @@ int streamer_init(streamer_t* streamer, GMainLoop *loop, const char* host, const if(!streamer) return -1; - streamer->host_ = host; - streamer->port_ = port; streamer->fd_ = init_server(host, port); if(streamer->fd_ < 0) { return streamer->fd_; diff --git a/src/streamer.h b/src/streamer.h index b47e252..3d867ea 100644 --- a/src/streamer.h +++ b/src/streamer.h @@ -33,8 +33,6 @@ struct streamer_struct { GMainLoop *loop_; GstElement* sink_; GThread* thread_; - char* host_; - char* port_; int fd_; }; typedef struct streamer_struct streamer_t; |