[rtmpdump] r155 - in trunk: rtmpsrv.c rtmpsuck.c streams.c thread.h
hyc
subversion at mplayerhq.hu
Thu Dec 31 05:10:31 CET 2009
Author: hyc
Date: Thu Dec 31 05:10:30 2009
New Revision: 155
Log:
More thread cleanup
Modified:
trunk/rtmpsrv.c
trunk/rtmpsuck.c
trunk/streams.c
trunk/thread.h
Modified: trunk/rtmpsrv.c
==============================================================================
--- trunk/rtmpsrv.c Thu Dec 31 04:17:26 2009 (r154)
+++ trunk/rtmpsrv.c Thu Dec 31 05:10:30 2009 (r155)
@@ -530,8 +530,9 @@ quit:
}
TFTYPE
-serverThread(STREAMING_SERVER * server)
+serverThread(void *arg)
{
+ STREAMING_SERVER *server = arg;
server->state = STREAMING_ACCEPTING;
while (server->state == STREAMING_ACCEPTING)
@@ -604,7 +605,7 @@ startStreaming(const char *address, int
server = (STREAMING_SERVER *) calloc(1, sizeof(STREAMING_SERVER));
server->socket = sockfd;
- ThreadCreate((thrfunc *)serverThread, server);
+ ThreadCreate(serverThread, server);
return server;
}
Modified: trunk/rtmpsuck.c
==============================================================================
--- trunk/rtmpsuck.c Thu Dec 31 04:17:26 2009 (r154)
+++ trunk/rtmpsuck.c Thu Dec 31 05:10:30 2009 (r155)
@@ -872,8 +872,9 @@ quit:
}
TFTYPE
-serverThread(STREAMING_SERVER * server)
+serverThread(void *arg)
{
+ STREAMING_SERVER *server = arg;
server->state = STREAMING_ACCEPTING;
while (server->state == STREAMING_ACCEPTING)
@@ -950,7 +951,7 @@ startStreaming(const char *address, int
server = (STREAMING_SERVER *) calloc(1, sizeof(STREAMING_SERVER));
server->socket = sockfd;
- ThreadCreate((thrfunc *)serverThread, server);
+ ThreadCreate(serverThread, server);
return server;
}
Modified: trunk/streams.c
==============================================================================
--- trunk/streams.c Thu Dec 31 04:17:26 2009 (r154)
+++ trunk/streams.c Thu Dec 31 05:10:30 2009 (r155)
@@ -761,8 +761,9 @@ filenotfound:
}
TFTYPE
-serverThread(STREAMING_SERVER * server)
+serverThread(void *arg)
{
+ STREAMING_SERVER *server = arg;
server->state = STREAMING_ACCEPTING;
while (server->state == STREAMING_ACCEPTING)
@@ -825,7 +826,7 @@ startStreaming(const char *address, int
server = (STREAMING_SERVER *) calloc(1, sizeof(STREAMING_SERVER));
server->socket = sockfd;
- ThreadCreate((void *(*)(void *)) serverThread, server);
+ ThreadCreate(serverThread, server);
return server;
}
Modified: trunk/thread.h
==============================================================================
--- trunk/thread.h Thu Dec 31 04:17:26 2009 (r154)
+++ trunk/thread.h Thu Dec 31 05:10:30 2009 (r155)
@@ -22,6 +22,7 @@
#define __THREAD_H__ 1
#ifdef WIN32
+#include <windows.h>
#include <process.h>
#define TFTYPE void
#define TFRET()
More information about the rtmpdump
mailing list