From: Rudolf Polzer Date: Wed, 17 Aug 2011 19:18:06 +0000 (+0200) Subject: make urllib actually work X-Git-Tag: xonotic-v0.5.0~127 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=00be2917456489532d5f96b66bb064a5196532a6;p=xonotic%2Fxonotic-data.pk3dir.git make urllib actually work --- diff --git a/qcsrc/common/urllib.qc b/qcsrc/common/urllib.qc index 7898e9206..7a5f33347 100644 --- a/qcsrc/common/urllib.qc +++ b/qcsrc/common/urllib.qc @@ -11,8 +11,6 @@ .url_ready_func url_ready; .entity url_ready_pass; -#define MIN_URL_ID 128 -#define NUM_URL_ID 64 entity url_fromid[NUM_URL_ID]; float autocvar__urllib_nextslot; diff --git a/qcsrc/common/urllib.qh b/qcsrc/common/urllib.qh index 603aae90d..a7735ed4f 100644 --- a/qcsrc/common/urllib.qh +++ b/qcsrc/common/urllib.qh @@ -12,3 +12,5 @@ void url_fputs(entity e, string s); // returns true if handled float url_URI_Get_Callback(float id, float status, string data); +#define MIN_URL_ID 128 +#define NUM_URL_ID 64 diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 9b0324755..09e2dfb05 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -2045,7 +2045,11 @@ void URI_Get_Callback(float id, float status, string data) dprint(data); dprint("\nEnd of data.\n"); - if (id == URI_GET_DISCARD) + if(url_URI_Get_Callback(id, status, data)) + { + // handled + } + else if (id == URI_GET_DISCARD) { // discard }