]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
rename url_fopen to url_single_fopen
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 6 Oct 2011 14:32:25 +0000 (16:32 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 6 Oct 2011 14:32:25 +0000 (16:32 +0200)
qcsrc/common/urllib.qc
qcsrc/common/urllib.qh
qcsrc/server/cl_player.qc

index 3d12c20e470a93436bb489c5f97072fe92c47fdf..5c585ae593f8f4cee007b1d8b9edcbfa94498b43 100644 (file)
@@ -78,7 +78,7 @@ float url_URI_Get_Callback(float id, float status, string data)
        }
 }
 
-void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
+void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass)
 {
        entity e;
        float i;
@@ -93,13 +93,13 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
 
                                // create a writing end that does nothing yet
                                e = spawn();
-                               e.classname = "url_fopen_file";
+                               e.classname = "url_single_fopen_file";
                                e.url_url = strzone(url);
                                e.url_fh = URL_FH_CURL;
                                e.url_wbuf = buf_create();
                                if(e.url_wbuf < 0)
                                {
-                                       print("url_fopen: out of memory in buf_create\n");
+                                       print("url_single_fopen: out of memory in buf_create\n");
                                        rdy(e, pass, URL_READY_ERROR);
                                        strunzone(e.url_url);
                                        remove(e);
@@ -124,7 +124,7 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
                                                        break;
                                        if(i >= autocvar__urllib_nextslot)
                                        {
-                                               print("url_fopen: too many concurrent requests\n");
+                                               print("url_single_fopen: too many concurrent requests\n");
                                                rdy(world, pass, URL_READY_ERROR);
                                                return;
                                        }
@@ -133,7 +133,7 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
                                // GET the data
                                if(!crypto_uri_postbuf(url, i + MIN_URL_ID, string_null, string_null, -1, 0))
                                {
-                                       print("url_fopen: failure in crypto_uri_postbuf\n");
+                                       print("url_single_fopen: failure in crypto_uri_postbuf\n");
                                        rdy(world, pass, URL_READY_ERROR);
                                        return;
                                }
@@ -142,7 +142,7 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
                                // all). Wait for data to come from the
                                // server, then call the callback
                                e = spawn();
-                               e.classname = "url_fopen_file";
+                               e.classname = "url_single_fopen_file";
                                e.url_url = strzone(url);
                                e.url_fh = URL_FH_CURL;
                                e.url_rbuf = -1;
@@ -164,12 +164,12 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
                        case FILE_WRITE:
                        case FILE_APPEND:
                                e = spawn();
-                               e.classname = "url_fopen_stdout";
+                               e.classname = "url_single_fopen_stdout";
                                e.url_fh = URL_FH_STDOUT;
                                rdy(e, pass, URL_READY_CANWRITE);
                                break;
                        case FILE_READ:
-                               print("url_fopen: cannot open '-' for reading\n");
+                               print("url_single_fopen: cannot open '-' for reading\n");
                                rdy(world, pass, URL_READY_ERROR);
                                break;
                }
@@ -186,7 +186,7 @@ void url_fopen(string url, float mode, url_ready_func rdy, entity pass)
                else
                {
                        e = spawn();
-                       e.classname = "url_fopen_file";
+                       e.classname = "url_single_fopen_file";
                        e.url_fh = fh;
                        if(mode == FILE_READ)
                                rdy(e, pass, URL_READY_CANREAD);
@@ -342,7 +342,7 @@ void url_multi_ready(entity fh, entity me, float status)
                        remove(me);
                        return;
                }
-               url_fopen(argv(me.cnt), me.lip, url_multi_ready, me);
+               url_single_fopen(argv(me.cnt), me.lip, url_multi_ready, me);
                return;
        }
        me.url_ready(fh, me.url_ready_pass, status);
@@ -366,5 +366,5 @@ void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass)
        me.lip = mode;
        me.url_ready = rdy;
        me.url_ready_pass = pass;
-       url_fopen(argv(0), mode, url_multi_ready, me);
+       url_single_fopen(argv(0), mode, url_multi_ready, me);
 }
index e4aa49ee23a33610bfab30f9d72358d10a4c0701..6c31a5a9ca402a4bb8142654672b15b38c28f81d 100644 (file)
@@ -5,7 +5,7 @@ float URL_READY_CANREAD  =  2;
 // errors: -1, or negative HTTP status code
 typedef void(entity handle, entity pass, float status) url_ready_func;
 
-void url_fopen(string url, float mode, url_ready_func rdy, entity pass);
+void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
 void url_fclose(entity e, url_ready_func rdy, entity pass);
 string url_fgets(entity e);
 void url_fputs(entity e, string s);
index 584a86fcc67561aad177e97396135b75bb704f77..cb9ce2b90ec988f153dad517c4a53c7d883c29e1 100644 (file)
@@ -21,7 +21,7 @@ void WeaponStats_ready(entity fh, entity pass, float status)
        switch(status)
        {
                case URL_READY_CANWRITE:
-                       // url_fopen returned, we can write
+                       // we can write
                        prefix = strcat(autocvar_hostname, "\t", GetGametype(), "_", GetMapname(), "\t");
                        url_fputs(fh, "#begin statsfile\n");
                        url_fputs(fh, strcat("#date ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"), "\n"));