]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - libcurl.c
host: Refactor Host_Frame; simplify control flow.
[xonotic/darkplaces.git] / libcurl.c
index cd6d8279ddd7a14de3cbfc318c56ce2cf602b988..ce89092fe74371ae7212114359496c52e0962e5d 100644 (file)
--- a/libcurl.c
+++ b/libcurl.c
@@ -331,16 +331,16 @@ static void Curl_CheckCommandWhenDone(void)
                if(numdownloads_fail == 0)
                {
                        Con_DPrintf("cURL downloads occurred, executing %s\n", command_when_done);
-                       Cbuf_AddText(&cmd_client, "\n");
-                       Cbuf_AddText(&cmd_client, command_when_done);
-                       Cbuf_AddText(&cmd_client, "\n");
+                       Cbuf_AddText(cmd_client, "\n");
+                       Cbuf_AddText(cmd_client, command_when_done);
+                       Cbuf_AddText(cmd_client, "\n");
                }
                else
                {
                        Con_DPrintf("cURL downloads FAILED, executing %s\n", command_when_error);
-                       Cbuf_AddText(&cmd_client, "\n");
-                       Cbuf_AddText(&cmd_client, command_when_error);
-                       Cbuf_AddText(&cmd_client, "\n");
+                       Cbuf_AddText(cmd_client, "\n");
+                       Cbuf_AddText(cmd_client, command_when_error);
+                       Cbuf_AddText(cmd_client, "\n");
                }
                Curl_Clear_forthismap();
        }
@@ -377,7 +377,7 @@ static qbool CURL_OpenLibrary (void)
                return true;
 
        // Load the DLL
-       return Sys_LoadLibrary (dllnames, &curl_dll, curlfuncs);
+       return Sys_LoadDependency (dllnames, &curl_dll, curlfuncs);
 }
 
 
@@ -1553,7 +1553,7 @@ void Curl_Init_Commands(void)
        Cvar_RegisterVariable (&cl_curl_useragent);
        Cvar_RegisterVariable (&cl_curl_useragent_append);
        Cmd_AddCommand(CF_CLIENT | CF_CLIENT_FROM_SERVER, "curl", Curl_Curl_f, "download data from an URL and add to search path");
-       //Cmd_AddCommand(&cmd_client, "curlcat", Curl_CurlCat_f, "display data from an URL (debugging command)");
+       //Cmd_AddCommand(cmd_client, "curlcat", Curl_CurlCat_f, "display data from an URL (debugging command)");
 }
 
 /*