summaryrefslogtreecommitdiff
path: root/lib/LuaHttp.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-11-29 06:27:29 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-11-29 09:01:49 +0100
commit6a21ca020d59a4ccae4452773695aae23017f19b (patch)
treed228259da7e3d76e2f742cbd8865d071ea9d48ee /lib/LuaHttp.cc
parent06613bc6d84de84c7500e03d219ae011729821f5 (diff)
Having a slightly better atomic support in the domain ids.
Diffstat (limited to 'lib/LuaHttp.cc')
-rw-r--r--lib/LuaHttp.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/LuaHttp.cc b/lib/LuaHttp.cc
index a88c77c..7d4c091 100644
--- a/lib/LuaHttp.cc
+++ b/lib/LuaHttp.cc
@@ -25,6 +25,7 @@
#include "Base85.h"
#include "HashFunction.h"
#include "RandISAAC.h"
+#include "Atomic.h"
class LuaDomain : public Domain {
public:
@@ -435,8 +436,8 @@ int sLua_HttpResponse::HttpResponse_proceed_statics(Lua * L, int n, int caller)
}
LuaDomain::LuaDomain(Lua * _L, String r) : Domain(r), L(_L->Father()) {
- id = max_id++; /***FIXME***/
-
+ id = Atomic::Increment(&max_id);
+
L->push(DOMAIN_REGISTRY);
L->gettable(LUA_REGISTRYINDEX);
L->push((lua_Number) id);