From 00be2917456489532d5f96b66bb064a5196532a6 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 17 Aug 2011 21:18:06 +0200 Subject: [PATCH] make urllib actually work --- qcsrc/common/urllib.qc | 2 -- qcsrc/common/urllib.qh | 2 ++ qcsrc/server/miscfunctions.qc | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) 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 } -- 2.39.2