summaryrefslogtreecommitdiff
path: root/core/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/services.cpp')
-rw-r--r--core/services.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/services.cpp b/core/services.cpp
index 903ee1a..27574b2 100644
--- a/core/services.cpp
+++ b/core/services.cpp
@@ -21,10 +21,16 @@ extern std::list<service*> services;
extern boost::mutex service_list_mutex;
int ServiceExists(const char *name);
-void CreateServiceFunction(const char* name, SERVICE svc)
+int CreateServiceFunction(const char* name, SERVICE svc)
{
if(!ServiceExists(name))
+ {
+ logger.log(LM_DEBUG, "Succesfuly registered service %s.\n", name);
services.push_back(new service(name, svc));
+ return 0;
+ }
+ logger.log(LM_DEBUG, "Failed to register service %s.\n", name);
+ return 1;
}
void* CallService(const char *name,void* data)