]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
patch from div0:
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 9f48080d1bf11c33f1ea0f999c9e1da1ced469fa..15ffddc92334e21508f0cbb520d88627331ad35b 100644 (file)
--- a/host.c
+++ b/host.c
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <time.h>
 #include "quakedef.h"
+#include "libcurl.h"
 #include "cdaudio.h"
 #include "cl_video.h"
 #include "progsvm.h"
@@ -131,7 +132,7 @@ void Host_Error (const char *error, ...)
                Sys_Error ("Host_Error: recursively entered (original error was: %s    new error is: %s)", hosterrorstring2, hosterrorstring1);
        hosterror = true;
 
-       strcpy(hosterrorstring2, hosterrorstring1);
+       strlcpy(hosterrorstring2, hosterrorstring1, sizeof(hosterrorstring2));
 
        CL_Parse_DumpPacket();
 
@@ -619,6 +620,8 @@ void Host_Main(void)
 
                NetConn_UpdateSockets();
 
+               Curl_Run();
+
        //-------------------
        //
        // server operations
@@ -735,7 +738,7 @@ void Host_Main(void)
                                // decide the simulation time
                                if (!cls.timedemo)
                                {
-                                       if (cls.capturevideo_active && !cls.capturevideo_soundfile)
+                                       if (cls.capturevideo_active)// && !cls.capturevideo_soundfile)
                                        {
                                                frametime = 1.0 / cls.capturevideo_framerate;
                                                cl.realframetime = max(cl.realframetime, frametime);
@@ -922,6 +925,7 @@ static void Host_Init (void)
        // initialize various cvars that could not be initialized earlier
        Memory_Init_Commands();
        Con_Init_Commands();
+       Curl_Init_Commands();
        Cmd_Init_Commands();
        Sys_Init_Commands();
        COM_Init_Commands();
@@ -932,6 +936,7 @@ static void Host_Init (void)
        Mathlib_Init();
 
        NetConn_Init();
+       Curl_Init();
        //PR_Init();
        //PR_Cmd_Init();
        PRVM_Init();
@@ -1086,6 +1091,7 @@ void Host_Shutdown(void)
 
        CDAudio_Shutdown ();
        S_Terminate ();
+       Curl_Shutdown ();
        NetConn_Shutdown ();
        //PR_Shutdown ();