From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- .../nelns/admin_service/?hideattic=0/index.html | 107 +++ .../admin_service/?only_with_tag=HEAD/index.html | 107 +++ .../nelns/admin_service/?sortby=author/index.html | 107 +++ .../nelns/admin_service/?sortby=date/index.html | 98 ++ .../nelns/admin_service/?sortby=log/index.html | 107 +++ .../nelns/admin_service/?sortby=rev/index.html | 107 +++ .../code/nelns/admin_service/Makefile.am | 184 ++++ .../admin_service/Makefile.am.diff?r1=1.1&r2=1.2 | 33 + .../admin_service/Makefile.am.diff?r1=1.2&r2=1.3 | 26 + .../admin_service/Makefile.am.diff?r1=1.3&r2=1.4 | 36 + .../admin_service/Makefile.am.diff?r1=1.5&r2=1.6 | 30 + .../nelns/admin_service/Makefile.am?annotate=1.3 | 76 ++ .../nelns/admin_service/Makefile.am?annotate=1.5 | 76 ++ .../nelns/admin_service/Makefile.am?annotate=1.6 | 76 ++ .../admin_service/Makefile.am?only_with_tag=HEAD | 138 +++ .../code/nelns/admin_service/Makefile.am?r1=1.3 | 187 ++++ .../code/nelns/admin_service/Makefile.am?r1=1.6 | 188 ++++ .../x-cvsweb-markup/index.html | 29 + .../x-cvsweb-markup&sortby=date/index.html | 30 + .../nelns/admin_service/Makefile.am?sortby=log | 187 ++++ .../nelns/admin_service/Makefile.am?sortby=rev | 187 ++++ .../code/nelns/admin_service/admin_service.cfg | 184 ++++ .../admin_service.cfg.diff?r1=1.5&r2=1.6 | 35 + .../admin_service/admin_service.cfg?annotate=1.2 | 76 ++ .../admin_service.cfg?only_with_tag=MAIN | 186 ++++ .../nelns/admin_service/admin_service.cfg?r1=1.1 | 187 ++++ .../nelns/admin_service/admin_service.cfg?r1=1.2 | 187 ++++ .../nelns/admin_service/admin_service.cfg?r1=1.3 | 187 ++++ .../nelns/admin_service/admin_service.cfg?r1=1.5 | 187 ++++ .../nelns/admin_service/admin_service.cfg?r1=1.6 | 188 ++++ .../x-cvsweb-markup/index.html | 31 + .../x-cvsweb-markup&sortby=author/index.html | 33 + .../x-cvsweb-markup&sortby=date/index.html | 33 + .../x-cvsweb-markup&sortby=rev/index.html | 33 + .../x-cvsweb-markup/index.html | 33 + .../admin_service/admin_service.cfg?sortby=author | 187 ++++ .../code/nelns/admin_service/admin_service.cpp | 274 ++++++ .../admin_service.cpp.diff?r1=1.10&r2=1.11 | 46 + .../admin_service.cpp.diff?r1=1.13&r2=1.14 | 45 + .../admin_service.cpp.diff?r1=1.14&r2=1.15 | 68 ++ .../admin_service.cpp.diff?r1=1.4&r2=1.5 | 379 ++++++++ .../admin_service.cpp.diff?r1=1.5&r2=1.1 | 849 +++++++++++++++++ .../admin_service.cpp.diff?r1=1.5&r2=1.11 | 495 ++++++++++ .../admin_service.cpp.diff?r1=1.5&r2=1.13 | 547 +++++++++++ .../admin_service.cpp.diff?r1=1.5&r2=1.14 | 573 +++++++++++ .../admin_service.cpp.diff?r1=1.5&r2=1.6 | 379 ++++++++ .../admin_service.cpp.diff?r1=1.7&r2=1.8 | 29 + .../admin_service/admin_service.cpp?annotate=1.14 | 76 ++ .../admin_service/admin_service.cpp?annotate=1.15 | 76 ++ .../admin_service/admin_service.cpp?annotate=1.7 | 76 ++ .../admin_service/admin_service.cpp?annotate=1.9 | 76 ++ .../x-cvsweb-markup&rev=1.14 | 999 +++++++++++++++++++ .../nelns/admin_service/admin_service.cpp?r1=1.11 | 286 ++++++ .../nelns/admin_service/admin_service.cpp?r1=1.14 | 286 ++++++ .../nelns/admin_service/admin_service.cpp?r1=1.15 | 287 ++++++ .../nelns/admin_service/admin_service.cpp?r1=1.2 | 286 ++++++ .../nelns/admin_service/admin_service.cpp?r1=1.4 | 286 ++++++ .../nelns/admin_service/admin_service.cpp?r1=1.6 | 286 ++++++ .../nelns/admin_service/admin_service.cpp?r1=1.7 | 286 ++++++ .../x-cvsweb-markup/index.html | 943 ++++++++++++++++++ .../x-cvsweb-markup/index.html | 947 ++++++++++++++++++ .../x-cvsweb-markup/index.html | 995 +++++++++++++++++++ .../x-cvsweb-markup&sortby=author/index.html | 1001 ++++++++++++++++++++ .../x-cvsweb-markup&sortby=log/index.html | 1001 ++++++++++++++++++++ .../x-cvsweb-markup&sortby=rev/index.html | 1001 ++++++++++++++++++++ .../x-cvsweb-markup/index.html | 253 +++++ .../x-cvsweb-markup/index.html | 756 +++++++++++++++ .../x-cvsweb-markup/index.html | 948 ++++++++++++++++++ .../admin_service/admin_service.cpp?sortby=author | 277 ++++++ .../admin_service/admin_service.cpp?sortby=date | 277 ++++++ .../admin_service/admin_service.cpp?sortby=log | 277 ++++++ .../admin_service/admin_service.cpp?sortby=rev | 277 ++++++ .../code/nelns/admin_service/admin_service.dsp | 174 ++++ .../admin_service.dsp.diff?r1=1.1&r2=1.2 | 32 + .../admin_service.dsp.diff?r1=1.2&r2=1.3 | 48 + .../admin_service/admin_service.dsp?annotate=1.1 | 76 ++ .../admin_service/admin_service.dsp?annotate=1.3 | 76 ++ .../admin_service/admin_service.dsp?annotate=1.4 | 76 ++ .../nelns/admin_service/admin_service.dsp?r1=1.3 | 176 ++++ .../nelns/admin_service/admin_service.dsp?r1=1.4 | 176 ++++ .../nelns/admin_service/admin_service.dsp?r1=1.5 | 177 ++++ .../admin_service.dsp?r1=1.5&only_with_tag=HEAD | 137 +++ .../x-cvsweb-markup/index.html | 135 +++ .../x-cvsweb-markup/index.html | 172 ++++ .../admin_service/admin_service.dsp?sortby=date | 177 ++++ .../admin_service/admin_service.dsp?sortby=log | 177 ++++ .../admin_service/admin_service.dsp?sortby=rev | 177 ++++ .../code/nelns/admin_service/admin_service.vcproj | 134 +++ .../x-cvsweb-markup&sortby=date/index.html | 269 ++++++ .../x-cvsweb-markup/index.html | 269 ++++++ .../admin_service.vcproj?sortby=author | 137 +++ cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg | 134 +++ .../nelns/admin_service/common.cfg?annotate=1.1 | 76 ++ .../x-cvsweb-markup&rev=1.1 | 19 + .../x-cvsweb-markup&sortby=author/index.html | 19 + .../x-cvsweb-markup&sortby=date/index.html | 19 + .../x-cvsweb-markup&sortby=log/index.html | 19 + .../x-cvsweb-markup&sortby=rev/index.html | 19 + .../code/nelns/admin_service/common.cfg?sortby=log | 137 +++ .../code/nelns/admin_service/common.cfg?sortby=rev | 137 +++ cvs/cvsweb.cgi/code/nelns/admin_service/index.html | 106 +++ 101 files changed, 23306 insertions(+) create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/?hideattic=0/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/?only_with_tag=HEAD/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=author/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=date/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=log/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=rev/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.1&r2=1.2 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.2&r2=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.3&r2=1.4 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.5&r2=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.5 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?only_with_tag=HEAD create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.5&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=log create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=rev create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg.diff?r1=1.5&r2=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?annotate=1.2 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?only_with_tag=MAIN create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.1 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.2 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.5 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.4&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=author/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=rev/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?sortby=author create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.10&r2=1.11 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.13&r2=1.14 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.14&r2=1.15 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.4&r2=1.5 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.1 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.11 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.13 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.14 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.7&r2=1.8 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.14 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.15 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.7 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.9 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?content-type=text/x-cvsweb-markup&rev=1.14 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.11 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.14 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.15 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.2 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.4 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.6 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.7 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.10&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.11&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.12&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=author/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=log/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=rev/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.2&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.4&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.9&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=author create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=date create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=log create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=rev create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.1&r2=1.2 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.2&r2=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.1 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.4 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.3 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.4 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5&only_with_tag=HEAD create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.2&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.5&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=date create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=log create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=rev create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?sortby=author create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?annotate=1.1 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?content-type=text/x-cvsweb-markup&rev=1.1 create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=author/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=log/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=rev/index.html create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=log create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=rev create mode 100644 cvs/cvsweb.cgi/code/nelns/admin_service/index.html (limited to 'cvs/cvsweb.cgi/code/nelns/admin_service') diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/?hideattic=0/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/?hideattic=0/index.html new file mode 100644 index 00000000..376c1a9c --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/?hideattic=0/index.html @@ -0,0 +1,107 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+ + + + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + Makefile.am + 1.6  6 weeks lecroart  no message +
[TXT] + admin_service.cfg + 1.6  3 months lecroart  ADDED: common.cfg +
[TXT] + admin_service.cpp + 1.15  4 months lecroart  CHANGED: use new service functions +
[TXT] + admin_service.dsp + 1.5  11 months lecroart  ADDED: DebugFast config +
[TXT] + admin_service.vcproj + 1.1  3 months lecroart  ADDED: visual .net project +
[TXT] + common.cfg + 1.1  3 months lecroart  ADDED: common.cfg +

+ +Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/?only_with_tag=HEAD/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/?only_with_tag=HEAD/index.html new file mode 100644 index 00000000..8e4dbb21 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/?only_with_tag=HEAD/index.html @@ -0,0 +1,107 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+

Current tag: HEAD + + + + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + Makefile.am + 1.6  6 weeks lecroart  no message +
[TXT] + admin_service.cfg + 1.6  3 months lecroart  ADDED: common.cfg +
[TXT] + admin_service.cpp + 1.15  4 months lecroart  CHANGED: use new service functions +
[TXT] + admin_service.dsp + 1.5  11 months lecroart  ADDED: DebugFast config +
[TXT] + admin_service.vcproj + 1.1  3 months lecroart  ADDED: visual .net project +
[TXT] + common.cfg + 1.1  3 months lecroart  ADDED: common.cfg +


+Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=author/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=author/index.html new file mode 100644 index 00000000..48f8be16 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=author/index.html @@ -0,0 +1,107 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+ + + + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + Makefile.am + 1.6  9 days lecroart  no message +
[TXT] + admin_service.cfg + 1.6  8 weeks lecroart  ADDED: common.cfg +
[TXT] + admin_service.cpp + 1.15  2 months lecroart  CHANGED: use new service functions +
[TXT] + admin_service.dsp + 1.5  9 months lecroart  ADDED: DebugFast config +
[TXT] + admin_service.vcproj + 1.1  2 months lecroart  ADDED: visual .net project +
[TXT] + common.cfg + 1.1  8 weeks lecroart  ADDED: common.cfg +

+ +Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=date/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=date/index.html new file mode 100644 index 00000000..c65f6cab --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=date/index.html @@ -0,0 +1,98 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+ + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + admin_service.cpp + 1.11  10 days lecroart  BUGFIX: when a service isn't ready and already disconnected, it doesn't crash an...
[TXT] + admin_service.cfg + 1.3  3 weeks lecroart  ADDED: win32 console position +
[TXT] + admin_service.dsp + 1.4  5 weeks lecroart  CHANGED: use win32 +
[TXT] + Makefile.am + 1.2  2 months lecroart  BUGFIX: now compile on linux +

+ +Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=log/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=log/index.html new file mode 100644 index 00000000..895ec88e --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=log/index.html @@ -0,0 +1,107 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+ + + + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + admin_service.dsp + 1.5  9 months lecroart  ADDED: DebugFast config +
[TXT] + admin_service.cfg + 1.6  8 weeks lecroart  ADDED: common.cfg +
[TXT] + common.cfg + 1.1  8 weeks lecroart  ADDED: common.cfg +
[TXT] + admin_service.vcproj + 1.1  2 months lecroart  ADDED: visual .net project +
[TXT] + admin_service.cpp + 1.15  2 months lecroart  CHANGED: use new service functions +
[TXT] + Makefile.am + 1.6  9 days lecroart  no message +

+ +Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=rev/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=rev/index.html new file mode 100644 index 00000000..156449fe --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/?sortby=rev/index.html @@ -0,0 +1,107 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+ + + + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + admin_service.cpp + 1.15  2 months lecroart  CHANGED: use new service functions +
[TXT] + Makefile.am + 1.6  9 days lecroart  no message +
[TXT] + admin_service.cfg + 1.6  8 weeks lecroart  ADDED: common.cfg +
[TXT] + admin_service.dsp + 1.5  9 months lecroart  ADDED: DebugFast config +
[TXT] + admin_service.vcproj + 1.1  2 months lecroart  ADDED: visual .net project +
[TXT] + common.cfg + 1.1  8 weeks lecroart  ADDED: common.cfg +

+ +Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am new file mode 100644 index 00000000..50897328 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am @@ -0,0 +1,184 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / Makefile.am
+ + + + + +
Makefile.am
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Wed Jun 12 10:21:02 2002 UTC (9 days, 19 hours ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +4 -3 + lines
Diff to previous 1.5 +

+no message
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Wed Apr 10 07:33:07 2002 UTC (2 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +1 -3 + lines
Diff to previous 1.4 +

+CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary)
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (3 months ago) by valignat +
Branch: MAIN + +
Changes since 1.3: +6 -4 + lines
Diff to previous 1.3 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Fri Jul 27 15:51:10 2001 UTC (10 months, 3 weeks ago) by valignat +
Branch: MAIN + +
Changes since 1.2: +4 -3 + lines
Diff to previous 1.2 +

+#ADDED some missing source files and clean Makefile.am for NeLNS.
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -4 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.1&r2=1.2 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.1&r2=1.2 new file mode 100644 index 00000000..ebd58713 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.1&r2=1.2 @@ -0,0 +1,33 @@ + + + +code/nelns/admin_service/Makefile.am - diff - 1.2 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/Makefile.am between version 1.1 and 1.2

+ + + + + + + + + + + + + + + + +
version 1.1, 2001/05/02 12:36:39version 1.2, 2001/05/03 13:19:13
Line 4 
Line 4 
  
 MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
  
 bin_PROGRAMS         = admin_executor_service bin_PROGRAMS         = admin_service
  
 time_service_SOURCES = admin_executor_service.cpp admin_service_SOURCES = admin_service.cpp
  
 time_service_LDADD   = -lnelnet -lnelmisc admin_service_LDADD   = -lnelnet -lnelmisc
  
  
 # End of Makefile.am # End of Makefile.am


+
Legend:
+
Removed from v.1.1 
changed lines
 Added in v.1.2
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.2&r2=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.2&r2=1.3 new file mode 100644 index 00000000..a4afe9c8 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.2&r2=1.3 @@ -0,0 +1,26 @@ + + + +code/nelns/admin_service/Makefile.am - diff - 1.3 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/Makefile.am between version 1.2 and 1.3

+ + + + + + + + + +
version 1.2, 2001/05/03 13:19:13version 1.3, 2001/07/27 15:51:10
Line 12 
Line 12 
  
  
 # End of Makefile.am # End of Makefile.am
  


+
Legend:
+
Removed from v.1.2 
changed lines
 Added in v.1.3
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.3&r2=1.4 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.3&r2=1.4 new file mode 100644 index 00000000..220eb220 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.3&r2=1.4 @@ -0,0 +1,36 @@ + + + +code/nelns/admin_service/Makefile.am - diff - 1.4 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/Makefile.am between version 1.3 and 1.4

+ + + + + + + + + + + + + + + + + + + +
version 1.3, 2001/07/27 15:51:10version 1.4, 2002/03/19 17:42:48
Line 4 
Line 4 
  
 MAINTAINERCLEANFILES  = Makefile.in MAINTAINERCLEANFILES  = Makefile.in
  
 bin_PROGRAMS          = admin_service EXTRA_DIST                     = admin_service.cfg \
                                   admin_service.dsp
  
 admin_service_SOURCES = admin_service.cpp sbin_PROGRAMS         = admin_service
  
 admin_service_LDADD   = -lnelnet -lnelmisc admin_service_SOURCES = admin_service.cpp
  
  pkgsysconf_DATA       = admin_service.cfg
  
 # End of Makefile.am # End of Makefile.am
  


+
Legend:
+
Removed from v.1.3 
changed lines
 Added in v.1.4
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.5&r2=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.5&r2=1.6 new file mode 100644 index 00000000..4562c132 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am.diff?r1=1.5&r2=1.6 @@ -0,0 +1,30 @@ + + + +code/nelns/admin_service/Makefile.am - diff - 1.6 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/Makefile.am between version 1.5 and 1.6

+ + + + + + + + + + + + + +
version 1.5, 2002/04/10 07:33:07version 1.6, 2002/06/12 10:21:02
Line 4 
Line 4 
  
 MAINTAINERCLEANFILES  = Makefile.in MAINTAINERCLEANFILES  = Makefile.in
  
 EXTRA_DIST                     = admin_service.cfg \ EXTRA_DIST            = common.cfg \
                          admin_service.cfg \
                                  admin_service.dsp                                  admin_service.dsp
  
 sbin_PROGRAMS         = admin_service sbin_PROGRAMS         = admin_service


+
Legend:
+
Removed from v.1.5 
changed lines
 Added in v.1.6
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.3 new file mode 100644 index 00000000..7c8cebc9 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.3 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/Makefile.am - annotate - 1.3 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/Makefile.am, Revision 1.3

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.5 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.5 new file mode 100644 index 00000000..6607b03e --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.5 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/Makefile.am - annotate - 1.5 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/Makefile.am, Revision 1.5

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.6 new file mode 100644 index 00000000..a0790017 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?annotate=1.6 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/Makefile.am - annotate - 1.6 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/Makefile.am, Revision 1.6

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?only_with_tag=HEAD b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?only_with_tag=HEAD new file mode 100644 index 00000000..ce659657 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?only_with_tag=HEAD @@ -0,0 +1,138 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / Makefile.am
+ + + + + +
Makefile.am
+

+

Default branch: MAIN
+Current tag: HEAD
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Wed Jun 12 10:21:02 2002 UTC (6 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +4 -3 + lines
Diff to previous 1.5 +

+no message
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.3 new file mode 100644 index 00000000..c4f9b899 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.3 @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / Makefile.am
+ + + + + +
Makefile.am
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Wed Jun 12 10:21:02 2002 UTC (6 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +4 -3 + lines
Diff to previous 1.5 + to selected 1.3 +

+no message
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Wed Apr 10 07:33:07 2002 UTC (3 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +1 -3 + lines
Diff to previous 1.4 + to selected 1.3 +

+CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary)
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.3: +6 -4 + lines
Diff to previous 1.3 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.3 / (download) - annotate - [selected], Fri Jul 27 15:51:10 2001 UTC (11 months, 3 weeks ago) by valignat +
Branch: MAIN + +
Changes since 1.2: +4 -3 + lines
Diff to previous 1.2 +

+#ADDED some missing source files and clean Makefile.am for NeLNS.
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -4 + lines
Diff to previous 1.1 + to selected 1.3 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.3 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.6 new file mode 100644 index 00000000..441d51a3 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?r1=1.6 @@ -0,0 +1,188 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / Makefile.am
+ + + + + +
Makefile.am
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [selected], Wed Jun 12 10:21:02 2002 UTC (6 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +4 -3 + lines
Diff to previous 1.5 +

+no message
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Wed Apr 10 07:33:07 2002 UTC (3 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +1 -3 + lines
Diff to previous 1.4 + to selected 1.6 +

+CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary)
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.3: +6 -4 + lines
Diff to previous 1.3 + to selected 1.6 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Fri Jul 27 15:51:10 2001 UTC (11 months, 3 weeks ago) by valignat +
Branch: MAIN + +
Changes since 1.2: +4 -3 + lines
Diff to previous 1.2 + to selected 1.6 +

+#ADDED some missing source files and clean Makefile.am for NeLNS.
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -4 + lines
Diff to previous 1.1 + to selected 1.6 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.6 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.5&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.5&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..ca3da2ab --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.5&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,29 @@ + + + +code/nelns/admin_service/Makefile.am - view - 1.5 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / Makefile.am (download)
+Revision 1.5, Wed Apr 10 07:33:07 2002 UTC (2 months, 1 week ago) by lecroart +
Branch: MAIN +
Changes since 1.4: +1 -3 + lines
+CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary)
+
+

#
+# $Id: Makefile.am,v 1.5 2002/04/10 07:33:07 lecroart Exp $
+#
+
+MAINTAINERCLEANFILES  = Makefile.in
+
+EXTRA_DIST                     = admin_service.cfg \
+                                 admin_service.dsp
+
+sbin_PROGRAMS         = admin_service
+
+admin_service_SOURCES = admin_service.cpp
+
+# End of Makefile.am
+
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html new file mode 100644 index 00000000..76affe4b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html @@ -0,0 +1,30 @@ + + + +code/nelns/admin_service/Makefile.am - view - 1.6 + +
[BACK] Return to Makefile.am + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / Makefile.am (download)
+Revision 1.6, Wed Jun 12 10:21:02 2002 UTC (6 weeks ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.5: +4 -3 + lines
+no message
+
+

#
+# $Id: Makefile.am,v 1.6 2002/06/12 10:21:02 lecroart Exp $
+#
+
+MAINTAINERCLEANFILES  = Makefile.in
+
+EXTRA_DIST            = common.cfg \
+                        admin_service.cfg \
+                        admin_service.dsp
+
+sbin_PROGRAMS         = admin_service
+
+admin_service_SOURCES = admin_service.cpp
+
+# End of Makefile.am
+
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=log b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=log new file mode 100644 index 00000000..30f488bf --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=log @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / Makefile.am
+ + + + + +
Makefile.am
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Wed Jun 12 10:21:02 2002 UTC (6 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +4 -3 + lines
Diff to previous 1.5 +

+no message
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Wed Apr 10 07:33:07 2002 UTC (3 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +1 -3 + lines
Diff to previous 1.4 +

+CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary)
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.3: +6 -4 + lines
Diff to previous 1.3 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Fri Jul 27 15:51:10 2001 UTC (11 months, 3 weeks ago) by valignat +
Branch: MAIN + +
Changes since 1.2: +4 -3 + lines
Diff to previous 1.2 +

+#ADDED some missing source files and clean Makefile.am for NeLNS.
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -4 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=rev b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=rev new file mode 100644 index 00000000..a2b0218f --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/Makefile.am?sortby=rev @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / Makefile.am
+ + + + + +
Makefile.am
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Wed Jun 12 10:21:02 2002 UTC (6 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +4 -3 + lines
Diff to previous 1.5 +

+no message
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Wed Apr 10 07:33:07 2002 UTC (3 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +1 -3 + lines
Diff to previous 1.4 +

+CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary)
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.3: +6 -4 + lines
Diff to previous 1.3 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Fri Jul 27 15:51:10 2001 UTC (11 months, 3 weeks ago) by valignat +
Branch: MAIN + +
Changes since 1.2: +4 -3 + lines
Diff to previous 1.2 +

+#ADDED some missing source files and clean Makefile.am for NeLNS.
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -4 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg new file mode 100644 index 00000000..f1715696 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg @@ -0,0 +1,184 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (8 weeks, 3 days ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (3 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (7 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (11 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Diff

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg.diff?r1=1.5&r2=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg.diff?r1=1.5&r2=1.6 new file mode 100644 index 00000000..3e77ebfd --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg.diff?r1=1.5&r2=1.6 @@ -0,0 +1,35 @@ + + + +code/nelns/admin_service/admin_service.cfg - diff - 1.6 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cfg between version 1.5 and 1.6

+ + + + + + + + + + + + + + + + + + +
version 1.5, 2002/03/01 10:20:45version 1.6, 2002/04/23 15:54:07
Line 1 
Line 1 
  // link the common configuration file
  RootConfigFilename = "common.cfg";
  
 // ip address of all servers where the AS find a AES. the AES port is always 49997 // ip address of all servers where the AS find a AES. the AES port is always 49997
  
Line 13 
Line 15 
 "S1", "LS", "S1", "LS",
 "S1", "WS", "S1", "WS",
 }; };
  
 WindowStyle = "WIN"; 
  
 Password = "toto"; Password = "toto";


+
Legend:
+
Removed from v.1.5 
changed lines
 Added in v.1.6
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?annotate=1.2 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?annotate=1.2 new file mode 100644 index 00000000..41581795 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?annotate=1.2 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.cfg - annotate - 1.2 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.cfg, Revision 1.2

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?only_with_tag=MAIN b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?only_with_tag=MAIN new file mode 100644 index 00000000..71841857 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?only_with_tag=MAIN @@ -0,0 +1,186 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+Current tag: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.1 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.1 new file mode 100644 index 00000000..7bab24fd --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.1 @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 + to selected 1.1 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 + to selected 1.1 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 + to selected 1.1 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 + to selected 1.1 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [selected], Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.2 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.2 new file mode 100644 index 00000000..21ab1451 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.2 @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 + to selected 1.2 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 + to selected 1.2 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 + to selected 1.2 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [selected], Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.2 +

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.3 new file mode 100644 index 00000000..2209f34c --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.3 @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 + to selected 1.3 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 + to selected 1.3 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [selected], Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 + to selected 1.3 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.3 +

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.5 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.5 new file mode 100644 index 00000000..d12b9622 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.5 @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [selected], Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 + to selected 1.5 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 + to selected 1.5 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 + to selected 1.5 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.5 +

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.6 new file mode 100644 index 00000000..b39a06d0 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?r1=1.6 @@ -0,0 +1,188 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [selected], Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 + to selected 1.6 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 + to selected 1.6 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 + to selected 1.6 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 + to selected 1.6 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.6 +

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.4&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.4&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..d6d00520 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.4&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,31 @@ + + + +code/nelns/admin_service/admin_service.cfg - view - 1.4 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cfg (download)
+Revision 1.4, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN +
Changes since 1.3: +3 -6 + lines
+#update cfg
+
+

+// ip address of all servers where the AS find a AES. the AES port is always 49997
+
+AESHosts = {
+"S1", "localhost",
+};
+
+
+// list of what to launch and where to launch. services are launch one after one
+
+Services = {
+"S1", "NS",
+"S1", "LS",
+"S1", "WS",
+};
+
+WindowStyle = "WIN";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=author/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=author/index.html new file mode 100644 index 00000000..218cf501 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=author/index.html @@ -0,0 +1,33 @@ + + + +code/nelns/admin_service/admin_service.cfg - view - 1.6 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cfg (download)
+Revision 1.6, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.5: +2 -2 + lines
+ADDED: common.cfg
+
+

// link the common configuration file
+RootConfigFilename = "common.cfg";
+
+// ip address of all servers where the AS find a AES. the AES port is always 49997
+
+AESHosts = {
+"S1", "localhost",
+};
+
+
+// list of what to launch and where to launch. services are launch one after one
+
+Services = {
+"S1", "NS",
+"S1", "LS",
+"S1", "WS",
+};
+
+Password = "toto";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html new file mode 100644 index 00000000..61b671bc --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=date/index.html @@ -0,0 +1,33 @@ + + + +code/nelns/admin_service/admin_service.cfg - view - 1.6 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cfg (download)
+Revision 1.6, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.5: +2 -2 + lines
+ADDED: common.cfg
+
+

// link the common configuration file
+RootConfigFilename = "common.cfg";
+
+// ip address of all servers where the AS find a AES. the AES port is always 49997
+
+AESHosts = {
+"S1", "localhost",
+};
+
+
+// list of what to launch and where to launch. services are launch one after one
+
+Services = {
+"S1", "NS",
+"S1", "LS",
+"S1", "WS",
+};
+
+Password = "toto";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=rev/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=rev/index.html new file mode 100644 index 00000000..b8d5a061 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup&sortby=rev/index.html @@ -0,0 +1,33 @@ + + + +code/nelns/admin_service/admin_service.cfg - view - 1.6 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cfg (download)
+Revision 1.6, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.5: +2 -2 + lines
+ADDED: common.cfg
+
+

// link the common configuration file
+RootConfigFilename = "common.cfg";
+
+// ip address of all servers where the AS find a AES. the AES port is always 49997
+
+AESHosts = {
+"S1", "localhost",
+};
+
+
+// list of what to launch and where to launch. services are launch one after one
+
+Services = {
+"S1", "NS",
+"S1", "LS",
+"S1", "WS",
+};
+
+Password = "toto";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..ba704a67 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?rev=1.6&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,33 @@ + + + +code/nelns/admin_service/admin_service.cfg - view - 1.6 + +
[BACK] Return to admin_service.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cfg (download)
+Revision 1.6, Tue Apr 23 15:54:07 2002 UTC (8 weeks, 3 days ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.5: +2 -2 + lines
+ADDED: common.cfg
+
+

// link the common configuration file
+RootConfigFilename = "common.cfg";
+
+// ip address of all servers where the AS find a AES. the AES port is always 49997
+
+AESHosts = {
+"S1", "localhost",
+};
+
+
+// list of what to launch and where to launch. services are launch one after one
+
+Services = {
+"S1", "NS",
+"S1", "LS",
+"S1", "WS",
+};
+
+Password = "toto";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?sortby=author b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?sortby=author new file mode 100644 index 00000000..3714b250 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cfg?sortby=author @@ -0,0 +1,187 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cfg
+ + + + + +
admin_service.cfg
+

+

Default branch: MAIN
+


+ Revision 1.6 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.5: +2 -2 + lines
Diff to previous 1.5 +

+ADDED: common.cfg
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:45 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +2 -0 + lines
Diff to previous 1.4 +

+ADDED: password per shard auth
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Tue Nov 13 15:13:14 2001 UTC (8 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +3 -6 + lines
Diff to previous 1.3 +

+#update cfg
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:07 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +5 -0 + lines
Diff to previous 1.2 +

+ADDED: win32 console position
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -1 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Fri May 18 16:49:42 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Diff

+ADDED: cfg file for example purpose
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp new file mode 100644 index 00000000..933bfdad --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp @@ -0,0 +1,274 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (2 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (3 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (3 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (11 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (11 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (11 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (12 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (12 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (12 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.10&r2=1.11 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.10&r2=1.11 new file mode 100644 index 00000000..db5e7fd9 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.10&r2=1.11 @@ -0,0 +1,46 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.11 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.10 and 1.11

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.10, 2001/07/05 08:26:07version 1.11, 2001/07/10 16:49:53
Line 514 
Line 514 
  
         nlinfo ("*:%d:%d disconnected", aes->Id, sid);         nlinfo ("*:%d:%d disconnected", aes->Id, sid);
  
         SIT sit = aes->findService(sid);         SIT sit = aes->findService(sid, false);
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
         msgout.serial (aes->Id, (*sit).Id);         msgout.serial (aes->Id, sid);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
  
          // the service could disconnect before it's identification, in this case, we don't have it in the service list
          if (sit != aes->Services.end ())
          {
         if ((*sit).InConfig)         if ((*sit).InConfig)
         {         {
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
Line 532 
Line 535 
         {         {
                 // erase only if it's not a service in the config                 // erase only if it's not a service in the config
                 aes->Services.erase (sit);                 aes->Services.erase (sit);
                  }
         }         }
  
         displayServices ();         displayServices ();


+
Legend:
+
Removed from v.1.10 
changed lines
 Added in v.1.11
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.13&r2=1.14 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.13&r2=1.14 new file mode 100644 index 00000000..c88ca26b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.13&r2=1.14 @@ -0,0 +1,45 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.14 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.13 and 1.14

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.13, 2002/03/01 10:20:32version 1.14, 2002/03/19 17:42:48
Line 24 
Line 24 
  * MA 02111-1307, USA.  * MA 02111-1307, USA.
  */  */
  
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif // HAVE_CONFIG_H
  
  #ifndef NELNS_CONFIG
  #define NELNS_CONFIG ""
  #endif // NELNS_CONFIG
  
  #ifndef NELNS_LOGS
  #define NELNS_LOGS ""
  #endif // NELNS_LOGS
  
 #include <string> #include <string>
 #include <list> #include <list>
  
Line 970 
Line 982 
 // AESAS is a client connection to the admin executor // AESAS is a client connection to the admin executor
  
 /// Naming Service /// Naming Service
 NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray); NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);


+
Legend:
+
Removed from v.1.13 
changed lines
 Added in v.1.14
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.14&r2=1.15 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.14&r2=1.15 new file mode 100644 index 00000000..a5c0bd52 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.14&r2=1.15 @@ -0,0 +1,68 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.15 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.14 and 1.15

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.14, 2002/03/19 17:42:48version 1.15, 2002/03/25 09:28:00
Line 36 
Line 36 
 #define NELNS_LOGS "" #define NELNS_LOGS ""
 #endif // NELNS_LOGS #endif // NELNS_LOGS
  
  #include "nel/misc/types_nl.h"
  
 #include <string> #include <string>
 #include <list> #include <list>
  
 #include "nel/net/service.h" 
 #include "nel/misc/debug.h" #include "nel/misc/debug.h"
 #include "nel/misc/config_file.h" #include "nel/misc/config_file.h"
 #include "nel/misc/command.h" #include "nel/misc/command.h"
  
  #include "nel/net/service.h"
 #include "nel/net/net_manager.h" #include "nel/net/net_manager.h"
  
 using namespace std; using namespace std;
Line 196 
Line 198 
         // get the script         // get the script
         try         try
         {         {
                 CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");                 CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
  
                 // check the position                 // check the position
  
Line 275 
Line 277 
  
         try         try
         {         {
                 CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");                 CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
  
                 for (sint i = 0 ; i < script.size (); i+=2)                 for (sint i = 0 ; i < script.size (); i+=2)
                 {                 {
Line 690 
Line 692 
         {         {
                 msgin.serial (password);                 msgin.serial (password);
  
                 if (password == IService::ConfigFile.getVar("Password").asString())                 if (password == IService::getInstance()->ConfigFile.getVar("Password").asString())
                 {                 {
                         // good authentification                         // good authentification
                         ok = true;                         ok = true;
Line 982 
Line 984 
 // AESAS is a client connection to the admin executor // AESAS is a client connection to the admin executor
  
 /// Naming Service /// Naming Service
 NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS); NLNET_OLD_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);


+
Legend:
+
Removed from v.1.14 
changed lines
 Added in v.1.15
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.4&r2=1.5 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.4&r2=1.5 new file mode 100644 index 00000000..0e5911d0 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.4&r2=1.5 @@ -0,0 +1,379 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.5 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.4 and 1.5

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.4, 2001/05/18 16:51:33version 1.5, 2001/05/31 16:44:54
Line 45 
Line 45 
         CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }         CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
  
         uint32        Id;                                /// uint32 to identify the service         uint32        Id;                                /// uint32 to identify the service
         string        ServiceAlias;        /// alias of the service used in the AES and AS to find him (unique per AES)         string        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
         string        ShortName;                /// name of the service in short format ("NS" for example)         string        ShortName;                /// name of the service in short format ("NS" for example)
         string        LongName;                /// name of the service in long format ("naming_service")         string        LongName;                /// name of the service in long format ("naming_service")
         bool        Ready;                        /// true if the service is ready         bool        Ready;                        /// true if the service is ready
Line 83 
Line 83 
                 return sit;                 return sit;
         }         }
  
          SIT findService (const string &alias, bool asrt = true)
          {
                  SIT sit;
                  for (sit = Services.begin(); sit != Services.end(); sit++)
                          if ((*sit).AliasName == alias)
                                  break;
  
                  if (asrt)
                          nlassert (sit != Services.end());
                  return sit;
          }
  
 private: private:
         static uint32 NextId;         static uint32 NextId;
 }; };
Line 138 
Line 150 
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
 bool ScriptRunning = false; bool StartAllServices = false;
 string ScriptName; uint32 StartAllServicesPos;
 uint32 ScriptPos; 
  
 void doNextScriptStep () void doNextStartAllServicesStep ()
 { {
         nlassert (ScriptRunning);         nlassert (StartAllServices);
  
  
         // get the script         // get the script
  
         try         try
         {         {
                 CConfigFile::CVar &script = IService::ConfigFile.getVar(ScriptName);                 CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
  
                 // check the position                 // check the position
  
                 if (ScriptPos*2 >= (uint32)script.size())                 if (StartAllServicesPos*2 >= (uint32)script.size())
                 {                 {
                         ScriptRunning = false;                         StartAllServices = false;
                         nlinfo("end of the script");                         nlinfo("end of the script");
                         // todo send that the script is finish to the admin                         // todo send that the script is finish to the admin
                         return;                         return;
Line 170 
Line 179 
  
                 try                 try
                 {                 {
                         serverAlias = script.asString (ScriptPos*2);                         serverAlias = script.asString (StartAllServicesPos*2);
                         serviceAlias = script.asString (ScriptPos*2+1);                         serviceAlias = script.asString (StartAllServicesPos*2+1);
                 }                 }
                 catch(EBadSize &)                 catch(EBadSize &)
                 {                 {
                         nlwarning ("script '%s' not contains a good number of entries (must be a multiple of 2)", ScriptName.c_str());                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         ScriptRunning = false;                         StartAllServices = false;
                         return;                         return;
                 }                 }
  
                 AESIT aesit = findAdminExecutorService (serverAlias, false);                 AESIT aesit = findAdminExecutorService (serverAlias, false);
                 if (aesit == AdminExecutorServices.end())                 if (aesit == AdminExecutorServices.end())
                 {                 {
                         ScriptRunning = false;                         StartAllServices = false;
                         nlwarning("don't find the server");                         nlwarning("don't find the server");
                         return;                         return;
                 }                 }
  
                  // check if the service is not currently running
  
                  StartAllServicesPos++;
  
                  SIT sit = (*aesit).findService (serviceAlias);
                  if ((*sit).Connected)
                  {
                          // the service is already running, go to the next process
                          doNextStartAllServicesStep ();
                  }
                  else
                  {
                 // send the resquest to the AES                 // send the resquest to the AES
  
                 CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");                 CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
                 msgout.serial (serviceAlias);                 msgout.serial (serviceAlias);
                 CNetManager::send ((*aesit).ServerAlias, msgout);                 CNetManager::send ((*aesit).ServerAlias, msgout);
                  }
                 ScriptPos++; 
         }         }
         catch(EUnknownVar&)         catch(EUnknownVar&)
         {         {
                 nlwarning ("script '%s' not found", ScriptName.c_str());                 nlwarning ("'Services' variable is not found");
                 ScriptRunning = false;                 StartAllServices = false;
                 return;                 return;
         }         }
 } }
  
 void initScript(string scriptName) void initStartAllServices ()
 { {
         if (ScriptRunning)         if (StartAllServices)
         {         {
                 nlwarning("already running a script, reset it");                 nlwarning("already running a script, reset it");
                 ScriptRunning = false;                 StartAllServices = false;
         }         }
  
         try         try
         {         {
                 CConfigFile::CVar &script = IService::ConfigFile.getVar(scriptName);                 CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
  
                 for (sint i = 0 ; i < script.size (); i+=2)                 for (sint i = 0 ; i < script.size (); i+=2)
                 {                 {
Line 222 
Line 242 
                         AESIT aesit = findAdminExecutorService (serverAlias, false);                         AESIT aesit = findAdminExecutorService (serverAlias, false);
                         if (aesit == AdminExecutorServices.end())                         if (aesit == AdminExecutorServices.end())
                         {                         {
                                 nlwarning("aes not running, can't run the script");                                 nlwarning("aes '%s' not running, can't run the script", serverAlias.c_str());
                                 return;                                 return;
                         }                         }
                 }                 }
Line 233 
Line 253 
                 return;                 return;
         }         }
  
         ScriptName = scriptName;         StartAllServicesPos = 0;
         ScriptPos = 0;         StartAllServices = true;
         ScriptRunning = true; 
  
         doNextScriptStep();         doNextStartAllServicesStep();
 } }
  
  
Line 316 
Line 335 
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         string alias;
  
         SIT sit = aes->findService(sid);         msgin.serial (sid, alias);
  
          SIT sit;
          if (!alias.empty())
          {
                  sit = aes->findService (alias, false);
  
                  if (sit == aes->Services.end ())
                  {
                          // the alias is not found
                          nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
  
                          aes->Services.push_back (CService ());
                          sit = aes->Services.end();
                          sit--;
                  }
                  else
                  {
                          // normal case
                  }
          }
          else
          {
                  sit = aes->findService (sid, false);
  
                  if (sit == aes->Services.end ())
                  {
                          // normal case for unknown services
                          nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
                  }
                  else
                  {
                          nlwarning ("new service without alias is already in my list with id %d", sid);
                  }
                  aes->Services.push_back (CService ());
                  sit = aes->Services.end();
                  sit--;
          }
  
          (*sit).Id = sid;
          (*sit).AliasName = alias;
          (*sit).Connected = true;
         msgin.serial ((*sit).ShortName, (*sit).LongName);         msgin.serial ((*sit).ShortName, (*sit).LongName);
  
         nlinfo ("*:%d:%d is identified to be '%s' '%s'", aes->Id, sid, (*sit).ShortName.c_str(), (*sit).LongName.c_str());         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
         msgout.serial (aes->Id, sid, (*sit).ShortName, (*sit).LongName);         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
  
Line 347 
Line 407 
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
  
         // if we are in a script execution, continue         // if we are in a script execution, continue
         if (ScriptRunning)         if (StartAllServices)
                 doNextScriptStep();                 doNextStartAllServicesStep();
 } }
  
 static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
 /*      CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
  
         nlinfo ("*:%d:%d connected", aes->Id, sid);         nlinfo ("*:%d:%d connected", aes->Id, sid);
  
         aes->Services.push_back (CService(sid));         // don't do anything. we have to wait identification to add it in out lists
  
  /*
          aes->Services.push_back (CService(sid));
  */
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SC");         CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
         msgout.serial (aes->Id, sid);         msgout.serial (aes->Id, sid);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 */} }
  
 static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
Line 384 
Line 447 
         msgout.serial (aes->Id, (*sit).Id);         msgout.serial (aes->Id, (*sit).Id);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
  
          if ((*sit).InConfig)
          {
                  (*sit).Ready = (*sit).Connected = false;
                  (*sit).Id = 0xFFFFFFFF;
                  (*sit).ShortName = (*sit).LongName = "";
          }
          else
          {
                  // erase only if it's not a service in the config
         aes->Services.erase (sit);         aes->Services.erase (sit);
 } }
  }
  
 // i'm connected to a new admin executor service // i'm connected to a new admin executor service
 void cbAESConnection (const string &serviceName, TSockId from, void *arg) void cbAESConnection (const string &serviceName, TSockId from, void *arg)
Line 420 
Line 493 
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
         aes->Connected = false;         aes->Connected = false;
  
          SIT sit;
          for (sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
          {
                  (*sit).Id = 0xFFFFFFFF;
                  (*sit).ShortName = (*sit).LongName = "";
                  (*sit).Ready = (*sit).Connected = false;
          }
  
         nlinfo ("*:%d:* disconnected", aes->Id);         nlinfo ("*:%d:* disconnected", aes->Id);
 /*       /*      
         // broadcast the message to all admin client that an admin exec is disconnected         // broadcast the message to all admin client that an admin exec is disconnected
Line 521 
Line 603 
                 {                 {
                         // send info about services of the AES                         // send info about services of the AES
                                                  
                         msgout.serial ((*sit).Id, (*sit).ServiceAlias, (*sit).ShortName, (*sit).LongName);                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                 }                 }
         }         }
Line 541 
Line 623 
 } }
  
  
 static void cbExecuteScript (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) 
 { 
         string script; 
         msgin.serial (script); 
         initScript (script); 
 } 
  
  
 static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         string command;         string command;
Line 574 
Line 648 
  
 static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         string serviceName;         string serviceAlias;
         uint32 aesid;         uint32 aesid;
         msgin.serial (aesid);         msgin.serial (aesid);
         msgin.serial (serviceName);         msgin.serial (serviceAlias);
  
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
Line 590 
Line 664 
         // send the resquest to the AES         // send the resquest to the AES
  
         CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");         CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
         msgout.serial (serviceName);         msgout.serial (serviceAlias);
         CNetManager::send ((*aesit).ServerAlias, msgout);         CNetManager::send ((*aesit).ServerAlias, msgout);
 } }
  
Line 655 
Line 729 
         CNetManager::send ((*aesit).ServerAlias, msgout);         CNetManager::send ((*aesit).ServerAlias, msgout);
 } }
  
  static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          initStartAllServices ();
  }
  
  static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
          {
                  for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                  {
                          if ((*sit).Connected)
                          {
                                  CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
                                  msgout.serial ((*sit).Id);
                                  CNetManager::send ((*aesit).ServerAlias, msgout);
                          }
                  }
          }
  }
  
 TCallbackItem ClientCallbackArray[] = TCallbackItem ClientCallbackArray[] =
 { {
         { "SYS", cbExecuteSystemCommand },         { "SYS", cbExecuteSystemCommand },
         { "EXEC", cbExecuteScript }, 
         { "STARTS", cbStartService },         { "STARTS", cbStartService },
         { "STOPS", cbStopService },         { "STOPS", cbStopService },
         { "EXEC_COMMAND", cbExecCommand },         { "EXEC_COMMAND", cbExecCommand },
          { "START_ALL_SERVICES", cbStartAllServices },
          { "STOP_ALL_SERVICES", cbStopAllServices },
 }; };
  
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
Line 678 
Line 773 
         /// Init the service, load the universal time.         /// Init the service, load the universal time.
         void                init ()         void                init ()
         {         {
                 DebugLog->addNegativeFilter ("L0:"); //              DebugLog->addNegativeFilter ("L0:");
                 DebugLog->addNegativeFilter ("L1:"); //              DebugLog->addNegativeFilter ("L1:");
                 DebugLog->addNegativeFilter ("L2:"); //              DebugLog->addNegativeFilter ("L2:");
                                  
                                  
                 CNetManager::setConnectionCallback ("AS", clientConnection, NULL);                 CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
Line 722 
Line 817 
  
                         // add new AES in the list                         // add new AES in the list
                         CService s;                         CService s;
                         s.ServiceAlias = serviceAlias;                         s.AliasName = serviceAlias;
                         s.InConfig = true;                         s.InConfig = true;
                         (*aesit).Services.push_back (s);                         (*aesit).Services.push_back (s);
                 }                 }


+
Legend:
+
Removed from v.1.4 
changed lines
 Added in v.1.5
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.1 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.1 new file mode 100644 index 00000000..e127b1b3 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.1 @@ -0,0 +1,849 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.5 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.1 and 1.5

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.1, 2001/05/02 12:36:39version 1.5, 2001/05/31 16:44:54
Line 7 
Line 7 
  
 /* Copyright, 2000 Nevrax Ltd. /* Copyright, 2000 Nevrax Ltd.
  *  *
  * This file is part of NEVRAX D.T.C. SYSTEM.  * This file is part of NEVRAX NeL Network Services.
  * NEVRAX D.T.C. SYSTEM is free software; you can redistribute it and/or modify  * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.  * any later version.
  *  *
  * NEVRAX D.T.C. SYSTEM is distributed in the hope that it will be useful, but  * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.  * General Public License for more details.
  *  *
  * You should have received a copy of the GNU General Public License  * You should have received a copy of the GNU General Public License
  * along with NEVRAX D.T.C. SYSTEM; see the file COPYING. If not, write to the  * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  * MA 02111-1307, USA.  * MA 02111-1307, USA.
  */  */
  
 #include <conio.h> 
  
 #include <string> #include <string>
 #include <list> #include <list>
  
  #include "nel/net/service.h"
 #include "nel/misc/debug.h" #include "nel/misc/debug.h"
 #include "nel/misc/config_file.h" #include "nel/misc/config_file.h"
  
 #include "nel/net/service.h" 
 #include "nel/net/net_manager.h" #include "nel/net/net_manager.h"
  
   
 using namespace std; using namespace std;
 using namespace NLMISC; using namespace NLMISC;
 using namespace NLNET; using namespace NLNET;
  
 #include <process.h> ////////////////////////
  
  
 struct CService struct CService
 { {
         CService(TSockId s) : AESSockId(s), AESId(NextAESId++) { }         CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
  
         TSockId        AESSockId;                // TSockId of the AES that have this service         uint32        Id;                                /// uint32 to identify the service
         uint32        AESId;                        // TSockId of the AES that have this service         string        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
         uint32        SId;                        // uint32 to identify the service         string        ShortName;                /// name of the service in short format ("NS" for example)
         string        ShortName;         string        LongName;                /// name of the service in long format ("naming_service")
         string        LongName;         bool        Ready;                        /// true if the service is ready
          bool        Connected;                /// true if the service is connected to the AES
          bool        InConfig;                /// true if the service is in the configuration
  };
  
 private: typedef list<CService> TServices;
  typedef list<CService>::iterator SIT;
  
  struct CAdminExecutorService
  {
          CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
  
          TSockId        SockId;                        /// connection to the AES
          uint32        Id;                                /// uint32 to identify the AES where the service is running
  
          string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
          string        ServerAddr;                /// address in a string format (only the ip)
          bool        Connected;                /// true if the AES is connected
  
          TServices Services;
  
          vector<string>        ServiceAliasList;
  
          SIT findService (uint32 sid, bool asrt = true)
          {
                  SIT sit;
                  for (sit = Services.begin(); sit != Services.end(); sit++)
                          if ((*sit).Id == sid)
                                  break;
  
                  if (asrt)
                          nlassert (sit != Services.end());
                  return sit;
          }
  
          SIT findService (const string &alias, bool asrt = true)
          {
                  SIT sit;
                  for (sit = Services.begin(); sit != Services.end(); sit++)
                          if ((*sit).AliasName == alias)
                                  break;
  
                  if (asrt)
                          nlassert (sit != Services.end());
                  return sit;
          }
  
         static        uint32 NextAESId; private:
          static uint32 NextId;
 }; };
  
 uint32 CService::NextAESId = 0; uint32 CAdminExecutorService::NextId = 1;
  
  typedef list<CAdminExecutorService> TAdminExecutorServices;
  typedef list<CAdminExecutorService>::iterator AESIT;
  
  TAdminExecutorServices AdminExecutorServices;
  
 list<CService> Services; /////////////////
 typedef list<CService>::iterator sit; 
  
 sit find (TSockId aesid, uint32 sid) AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
 { {
         sit it;         AESIT aesit;
         for (it = Services.begin(); it != Services.end(); it++)         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
                  if ((*aesit).Id == aesid)
                          break;
  
          if (asrt)
                  nlassert (aesit != AdminExecutorServices.end());
          return aesit;
  }
  
  AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
         {         {
                 if ((*it).AESSockId== aesid && (*it).SId == sid) break;         AESIT aesit;
          for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
                  if ((*aesit).ServerAlias == ServerAlias)
                          break;
  
          if (asrt)
                  nlassert (aesit != AdminExecutorServices.end());
          return aesit;
  }
  
  void displayServices ()
  {
          for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
          {
                  for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                  {
                          nlinfo ("> %s %s %s %d %d", (*aesit).SockId->asString().c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
         }         }
         return it; 
 } }
  }
  
  
 sit find (uint32 aesid, uint32 sid) ////////////////////////////////////////////////////////////////////////////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  /////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
  bool StartAllServices = false;
  uint32 StartAllServicesPos;
  
  void doNextStartAllServicesStep ()
 { {
         sit it;         nlassert (StartAllServices);
         for (it = Services.begin(); it != Services.end(); it++) 
          // get the script
          try
         {         {
                 if ((*it).AESId == aesid && (*it).SId == sid) break;                 CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
  
                  // check the position
  
                  if (StartAllServicesPos*2 >= (uint32)script.size())
                  {
                          StartAllServices = false;
                          nlinfo("end of the script");
                          // todo send that the script is finish to the admin
                          return;
         }         }
         return it; 
                  // get the script line
  
                  string serverAlias;
                  string serviceAlias;
  
                  try
                  {
                          serverAlias = script.asString (StartAllServicesPos*2);
                          serviceAlias = script.asString (StartAllServicesPos*2+1);
                  }
                  catch(EBadSize &)
                  {
                          nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                          StartAllServices = false;
                          return;
 } }
  
 /*                 AESIT aesit = findAdminExecutorService (serverAlias, false);
 NLMISC_COMMAND (start, "start a service", "<service_name>")                 if (aesit == AdminExecutorServices.end())
 { {
         if(args.size() != 1 && args.size() != 2) return false;                         StartAllServices = false;
                          nlwarning("don't find the server");
                          return;
                  }
  
         CMessage msgout (CNetManager::getSIDA("AES"), "ESC");                 // check if the service is not currently running
         msgout.serial (args[1]); 
  
         uint8 background = 0;                 StartAllServicesPos++;
  
         if (args.size() == 2)                 SIT sit = (*aesit).findService (serviceAlias);
                  if ((*sit).Connected)
         {         {
                 if (args[1] == "&")                         // the service is already running, go to the next process
                         uint8 background = 1;                         doNextStartAllServicesStep ();
                 else 
                         return false; 
         }         }
                  else
                  {
                          // send the resquest to the AES
  
         msgout.serial (background);                         CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
         CNetManager::send ("AES", msgout);                         msgout.serial (serviceAlias);
         return true;                         CNetManager::send ((*aesit).ServerAlias, msgout);
                  }
          }
          catch(EUnknownVar&)
          {
                  nlwarning ("'Services' variable is not found");
                  StartAllServices = false;
                  return;
          }
 } }
  
  void initStartAllServices ()
  {
          if (StartAllServices)
          {
                  nlwarning("already running a script, reset it");
                  StartAllServices = false;
          }
  
 CLog logstdout;         try
 CStdDisplayer dispstdout;         {
                  CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
  
 NLMISC_COMMAND (stop, "stop a service", "<aesid> <sid>")                 for (sint i = 0 ; i < script.size (); i+=2)
                  {
                          string serverAlias = script.asString(i);
                          AESIT aesit = findAdminExecutorService (serverAlias, false);
                          if (aesit == AdminExecutorServices.end())
 { {
         if(args.size() != 3) return false;                                 nlwarning("aes '%s' not running, can't run the script", serverAlias.c_str());
                                  return;
                          }
                  }
          }
          catch(EConfigFile &)
          {
                  nlwarning ("bad config file");
                  return;
          }
  
          StartAllServicesPos = 0;
          StartAllServices = true;
  
         CMessage msgout (CNetManager::getSIDA("AES"), "SS");         doNextStartAllServicesStep();
         msgout.serial (args[2]); 
         CNetManager::send ("AES", msgout); 
 } }
 */ 
  
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
Line 140 
Line 280 
         nlinfo("end of command result");         nlinfo("end of command result");
 } }
  
  static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
  /*      // get the service list from the admin exec and send the list to all admin client
          CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
          aes->Services.clear();
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SL");
  
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id);
  
          uint32 nbs;
          msgin.serial (nbs);
          msgout.serial (nbs);
  
          for (uint32 i = 0; i < nbs; i++)
          {
                  uint32 sid;
                  msgin.serial(sid);
  
                  aes->Services.push_back (CService(sid));
                  CService *s = &(aes->Services.back());
  
                  msgin.serial(s->ShortName, s->LongName, s->Ready);
  
                  msgout.serial (s->Id, s->ShortName, s->LongName, s->Ready);
          }
          CNetManager::send ("AS", msgout, 0);
          
          displayServices ();
  */}
  
  static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          // get the service list from the admin exec and send the list to all admin client
          CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
          aes->ServiceAliasList.clear ();
          msgin.serialCont (aes->ServiceAliasList);
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
          msgout.serial (aes->Id);
          msgout.serialCont (aes->ServiceAliasList);
          CNetManager::send ("AS", msgout, 0);
          
          nlinfo("new service alias list");
  }
  
  
 static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         string ShortName, LongName;         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
         msgin.serial (ShortName);         uint32 sid;
         msgin.serial (LongName);         string alias;
  
         nlinfo ("%s %s %s is identified", from->asString().c_str(), ShortName.c_str(), LongName.c_str());         msgin.serial (sid, alias);
  
          SIT sit;
          if (!alias.empty())
          {
                  sit = aes->findService (alias, false);
  
                  if (sit == aes->Services.end ())
                  {
                          // the alias is not found
                          nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
  
                          aes->Services.push_back (CService ());
                          sit = aes->Services.end();
                          sit--;
                  }
                  else
                  {
                          // normal case
                  }
          }
          else
          {
                  sit = aes->findService (sid, false);
  
                  if (sit == aes->Services.end ())
                  {
                          // normal case for unknown services
                          nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
                  }
                  else
                  {
                          nlwarning ("new service without alias is already in my list with id %d", sid);
                  }
                  aes->Services.push_back (CService ());
                  sit = aes->Services.end();
                  sit--;
          }
  
          (*sit).Id = sid;
          (*sit).AliasName = alias;
          (*sit).Connected = true;
          msgin.serial ((*sit).ShortName, (*sit).LongName);
  
          nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
  
          // broadcast the message to all admin client
          CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
          msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
          CNetManager::send ("AS", msgout, 0);
 } }
  
 static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         string ShortName, LongName;         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
          uint32 sid;
          msgin.serial (sid);
  
          SIT sit = aes->findService(sid);
          (*sit).Ready = true;
  
          nlinfo ("*:%d:%d is ready", aes->Id, sid);
  
         msgin.serial (ShortName);         // broadcast the message to all admin client
         msgin.serial (LongName);         CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
          msgout.serial (aes->Id, sid);
          CNetManager::send ("AS", msgout, 0);
  
         nlinfo ("%s %s %s is ready", from->asString().c_str(), ShortName.c_str(), LongName.c_str());         // if we are in a script execution, continue
          if (StartAllServices)
                  doNextStartAllServicesStep();
 } }
  
 static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         nlinfo ("%s a service is connected", from->asString().c_str());         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
          uint32 sid;
          msgin.serial (sid);
  
          nlinfo ("*:%d:%d connected", aes->Id, sid);
  
          // don't do anything. we have to wait identification to add it in out lists
  
  /*
          aes->Services.push_back (CService(sid));
  */
          // broadcast the message to all admin client
          CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
          msgout.serial (aes->Id, sid);
          CNetManager::send ("AS", msgout, 0);
 } }
  
 static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         string ShortName, LongName;         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
          uint32 sid;
          msgin.serial (sid);
  
          nlinfo ("*:%d:%d disconnected", aes->Id, sid);
  
          SIT sit = aes->findService(sid);
  
          // broadcast the message to all admin client
          CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
          msgout.serial (aes->Id, (*sit).Id);
          CNetManager::send ("AS", msgout, 0);
  
          if ((*sit).InConfig)
          {
                  (*sit).Ready = (*sit).Connected = false;
                  (*sit).Id = 0xFFFFFFFF;
                  (*sit).ShortName = (*sit).LongName = "";
          }
          else
          {
                  // erase only if it's not a service in the config
                  aes->Services.erase (sit);
          }
  }
  
  // i'm connected to a new admin executor service
  void cbAESConnection (const string &serviceName, TSockId from, void *arg)
  {
          AESIT aesit = findAdminExecutorService (serviceName);        
          CAdminExecutorService *aes = &(*aesit);
          
          // set the appid to find the aes in O(1)
          from->setAppId ((uint64)aes);
  
          aes->Connected = true;
          nlinfo ("*:%d:* connected", aes->Id);
  /*
          // broadcast the message that an admin exec is connected to all admin client
          CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
          msgout.serial (aes->Id);
          CNetManager::send ("AS", msgout, 0);
  */
  
          // broadcast the new state of this AES
          CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
          CNetManager::send ("AS", msgout, 0);
  }
  
  // i'm disconnected to an admin executor service
  void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
  {
          // get the aes with the appid
          CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
  
          aes->Connected = false;
  
          SIT sit;
          for (sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
          {
                  (*sit).Id = 0xFFFFFFFF;
                  (*sit).ShortName = (*sit).LongName = "";
                  (*sit).Ready = (*sit).Connected = false;
          }
  
         msgin.serial (ShortName);         nlinfo ("*:%d:* disconnected", aes->Id);
         msgin.serial (LongName); /*      
          // broadcast the message to all admin client that an admin exec is disconnected
          CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
          msgout.serial (aes->Id);
          CNetManager::send ("AS", msgout, 0);
  */
  
         nlinfo ("%s %s %s is disconnected", from->asString().c_str(), ShortName.c_str(), LongName.c_str());         // broadcast the new state of this AES
          CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
          CNetManager::send ("AS", msgout, 0);
  }
  
  static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          // received an answer for a command, give it to all admin client
  
          // broadcast the message to the admin service
          CMessage msgout (CNetManager::getSIDA ("AS"), "LOG");
          string log;
          msgin.serial (log);
          msgout.serial (log);
          CNetManager::send ("AS", msgout, 0);
 } }
  
  
Line 180 
Line 535 
 { {
         { "ESCR", cbExecuteSystemCommandResult },         { "ESCR", cbExecuteSystemCommandResult },
  
          { "SL", cbServiceList },
         { "SID", cbServiceIdentification },         { "SID", cbServiceIdentification },
         { "SR", cbServiceReady },         { "SR", cbServiceReady },
         { "SC", cbServiceConnection },         { "SC", cbServiceConnection },
         { "SD", cbServiceDisconnection },         { "SD", cbServiceDisconnection },
  
          { "SAL", cbServiceAliasList },
  
          { "LOG", cbLog },
 }; };
  
  
Line 193 
Line 553 
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
  void errorMessage(string message, TSockId from, CCallbackNetBase &netbase)
  {
          CMessage msgout (netbase.getSIDA (), "ERR");
          msgout.serial (message);
          netbase.send (msgout, from);
  }
  
  //
  // A new admin client is connected.
  //
 void clientConnection (const string &serviceName, TSockId from, void *arg) void clientConnection (const string &serviceName, TSockId from, void *arg)
 { {
         // new client, send him all out info about services         // new client, send him all out info about services
  
         nlinfo ("client %s is connected", from->asString().c_str());         nlinfo ("client %s is connected", from->asString().c_str());
                  
         CMessage msgout (CNetManager::getSIDA ("AESAS"), "SL");         //
         uint32 size = (uint32)Services.size();         // send the list of all the aes
         msgout.serial (size);         //
         for (sit it = Services.begin(); it != Services.end(); it++) 
         {         CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
                 msgout.serial ((*it).AESId);         AESIT aesit;
                 msgout.serial ((*it).SId);         uint32 nbaes = (uint32)AdminExecutorServices.size();
                 msgout.serial ((*it).ShortName);         msgout2.serial (nbaes);
                 msgout.serial ((*it).LongName);         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
          {
                  // send info about the AES
  
                  msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
          }
          CNetManager::send ("AS", msgout2, from);
  
          //
          // send the list of all services
          //
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
          nbaes = (uint32)AdminExecutorServices.size();
          msgout.serial (nbaes);
          for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
          {
                  msgout.serial ((*aesit).Id);
  
                  uint32 nbs = (uint32)(*aesit).Services.size();
                  msgout.serial (nbs);
  
                  for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                  {
                          // send info about services of the AES
                          
                          msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                          msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                  }
         }         }
         CNetManager::send ("AS", msgout, from);         CNetManager::send ("AS", msgout, from);
  
          //
          // send service alias list
          //
  
          for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
          {
                  CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
                  msgout2.serial ((*aesit).Id);
                  msgout2.serialCont ((*aesit).ServiceAliasList);
                  CNetManager::send ("AS", msgout2, from);
          }
  }
  
  
  static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          string command;
          uint32 aesid;
          msgin.serial (aesid);
          msgin.serial (command);
  
          AESIT aesit = findAdminExecutorService (aesid, false);
          if (aesit == AdminExecutorServices.end())
          {
                  // don't find the aes, send an error message
                  errorMessage ("couldn't execute command, as didn't find the aes", from, netbase);
                  return;
          }
  
          // send the resquest to the AES
  
          CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
          msgout.serial (command);
          CNetManager::send ((*aesit).ServerAlias, msgout);
  }
  
  
  static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          string serviceAlias;
          uint32 aesid;
          msgin.serial (aesid);
          msgin.serial (serviceAlias);
  
          AESIT aesit = findAdminExecutorService (aesid, false);
          if (aesit == AdminExecutorServices.end())
          {
                  // don't find the aes, send an error message
                  errorMessage ("couldn't start service, as didn't find the aes", from, netbase);
                  return;
          }
  
          // send the resquest to the AES
  
          CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
          msgout.serial (serviceAlias);
          CNetManager::send ((*aesit).ServerAlias, msgout);
  }
  
  static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          uint32 aesid, sid;
          msgin.serial (aesid);
          msgin.serial (sid);
  
          AESIT aesit = findAdminExecutorService (aesid, false);
          if (aesit == AdminExecutorServices.end())
          {
                  errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);
                  // don't find the aes, send an error message
                  return;
          }
  
          SIT sit = (*aesit).findService (sid, false);
          if (sit == (*aesit).Services.end())
          {
                  // don't find the s, send an error message
                  errorMessage ("couldn't stop service, as didn't find the service", from, netbase);
                  return;
          }
  
          // send the resquest to the AES
  
          CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
          msgout.serial (sid);
          CNetManager::send ((*aesit).ServerAlias, msgout);
  }
  
  static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          uint32 aesid, sid;
          string command;
          msgin.serial (aesid);
          msgin.serial (sid);
          msgin.serial (command);
  
          AESIT aesit = findAdminExecutorService (aesid, false);
          if (aesit == AdminExecutorServices.end())
          {
                  errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);
                  // don't find the aes, send an error message
                  return;
          }
  
          SIT sit = (*aesit).findService (sid, false);
          if (sit == (*aesit).Services.end())
          {
                  // don't find the s, send an error message
                  errorMessage ("couldn't stop service, as didn't find the service", from, netbase);
                  return;
 } }
  
 TCallbackItem ASCallbackArray[] =         // send the resquest to the AES
  
          CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
          msgout.serial (sid);
          msgout.serial (command);
          CNetManager::send ((*aesit).ServerAlias, msgout);
  }
  
  static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         { "", NULL },         initStartAllServices ();
  }
  
  static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
          {
                  for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                  {
                          if ((*sit).Connected)
                          {
                                  CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
                                  msgout.serial ((*sit).Id);
                                  CNetManager::send ((*aesit).ServerAlias, msgout);
                          }
                  }
          }
  }
  
  TCallbackItem ClientCallbackArray[] =
  {
          { "SYS", cbExecuteSystemCommand },
          { "STARTS", cbStartService },
          { "STOPS", cbStopService },
          { "EXEC_COMMAND", cbExecCommand },
          { "START_ALL_SERVICES", cbStartAllServices },
          { "STOP_ALL_SERVICES", cbStopAllServices },
 }; };
  
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  ////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
 class CAdminService : public IService class CAdminService : public IService
 { {
 public: public:
Line 224 
Line 773 
         /// Init the service, load the universal time.         /// Init the service, load the universal time.
         void                init ()         void                init ()
         {         {
                 CNetManager::setConnectionCallback ("AS", clientConnection, NULL); //              DebugLog->addNegativeFilter ("L0:");
  //              DebugLog->addNegativeFilter ("L1:");
  //              DebugLog->addNegativeFilter ("L2:");
  
                 // connec to the AES 
                 CNetManager::addClient ("AES", "localhost:49996"); 
                 CNetManager::addCallbackArray ("AES", AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0])); 
  
                  CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
  
                  //
                  // Get the list of AESHosts, add in the structures and create connection to all AES
                  //
  
                  CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
                  for (sint i = 0 ; i < host.size (); i+=2)
                  {
                          string serverAlias = host.asString(i);
                          string serverAddr = host.asString(i+1);
  
                          // add to the list
                          CAdminExecutorService aes;
                          aes.ServerAlias = serverAlias;
                          aes.ServerAddr = serverAddr;
                          AdminExecutorServices.push_back (aes);
  
                          // connect to the AES
                          CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
                          CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
                          CNetManager::addClient (serverAlias, serverAddr+":49996");
                          CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
                  }
  
                  //
                  // Get the list of services in the shard
                  //
  
                  CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
                  for (i = 0 ; i < serv.size (); i+=2)
                  {
                          string serverAlias = serv.asString(i);
                          string serviceAlias = serv.asString(i+1);
  
                          AESIT aesit = findAdminExecutorService (serverAlias);
  
                          // add new AES in the list
                          CService s;
                          s.AliasName = serviceAlias;
                          s.InConfig = true;
                          (*aesit).Services.push_back (s);
                  }
         }         }
  
         bool                update ()         bool                update ()
Line 239 
Line 830 
 }; };
  
  
  // AS is a server connection to the admin client
  // AESAS is a client connection to the admin executor
  
 /// Naming Service /// Naming Service
 NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ASCallbackArray); NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray);


+
Legend:
+
Removed from v.1.1 
changed lines
 Added in v.1.5
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.11 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.11 new file mode 100644 index 00000000..8684829c --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.11 @@ -0,0 +1,495 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.11 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.5 and 1.11

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.5, 2001/05/31 16:44:54version 1.11, 2001/07/10 16:49:53
Line 30 
Line 30 
 #include "nel/net/service.h" #include "nel/net/service.h"
 #include "nel/misc/debug.h" #include "nel/misc/debug.h"
 #include "nel/misc/config_file.h" #include "nel/misc/config_file.h"
  #include "nel/misc/command.h"
  
 #include "nel/net/net_manager.h" #include "nel/net/net_manager.h"
  
Line 51 
Line 52 
         bool        Ready;                        /// true if the service is ready         bool        Ready;                        /// true if the service is ready
         bool        Connected;                /// true if the service is connected to the AES         bool        Connected;                /// true if the service is connected to the AES
         bool        InConfig;                /// true if the service is in the configuration         bool        InConfig;                /// true if the service is in the configuration
          std::vector<NLMISC::CSerialCommand>        Commands;
  
          void setValues (const CService &t)
          {
                  // copy all except gtk stuffs
                  Id = t.Id;
                  AliasName = t.AliasName;
                  ShortName = t.ShortName;
                  LongName = t.LongName;
                  Ready = t.Ready;
                  Connected = t.Connected;
                  //InConfig = t.InConfig; never change the inconfig value
          }
 }; };
  
 typedef list<CService> TServices; typedef list<CService> TServices;
Line 136 
Line 150 
 { {
         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                  nlinfo ("> Admin");
                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                 {                 {
                         nlinfo ("> %s %s %s %d %d", (*aesit).SockId->asString().c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);                         nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
                 }                 }
         }         }
 } }
  
  
  // send a message to a client. if ok is 0 it s an error or it s a normal
  void messageToClient (uint8 ok, string msg, TSockId from = NULL)
  {
          CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
          msgout.serial (ok, msg);
          CNetManager::send ("AS", msgout, from);
  }
  
  
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////// SCRIPT MANAGER ///////////////////////////////////////////////////////////////////// /////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
Line 167 
Line 191 
                 if (StartAllServicesPos*2 >= (uint32)script.size())                 if (StartAllServicesPos*2 >= (uint32)script.size())
                 {                 {
                         StartAllServices = false;                         StartAllServices = false;
  
                         nlinfo("end of the script");                         nlinfo("end of the script");
                         // todo send that the script is finish to the admin                         messageToClient (1, "Start All Service finnished correctly");
                         return;                         return;
                 }                 }
  
Line 184 
Line 209 
                 }                 }
                 catch(EBadSize &)                 catch(EBadSize &)
                 {                 {
                          messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         StartAllServices = false;                         StartAllServices = false;
                         return;                         return;
Line 192 
Line 218 
                 AESIT aesit = findAdminExecutorService (serverAlias, false);                 AESIT aesit = findAdminExecutorService (serverAlias, false);
                 if (aesit == AdminExecutorServices.end())                 if (aesit == AdminExecutorServices.end())
                 {                 {
                         StartAllServices = false;                         messageToClient (1, "don't find the server");
                         nlwarning("don't find the server");                         nlwarning("don't find the server");
                          StartAllServices = false;
                         return;                         return;
                 }                 }
  
Line 218 
Line 245 
         }         }
         catch(EUnknownVar&)         catch(EUnknownVar&)
         {         {
                  messageToClient (1, "'Services' variable is not found");
                 nlwarning ("'Services' variable is not found");                 nlwarning ("'Services' variable is not found");
                 StartAllServices = false;                 StartAllServices = false;
                 return;                 return;
Line 228 
Line 256 
 { {
         if (StartAllServices)         if (StartAllServices)
         {         {
                  messageToClient (1, "already running a script, reset it");
                 nlwarning("already running a script, reset it");                 nlwarning("already running a script, reset it");
                 StartAllServices = false;                 StartAllServices = false;
         }         }
Line 242 
Line 271 
                         AESIT aesit = findAdminExecutorService (serverAlias, false);                         AESIT aesit = findAdminExecutorService (serverAlias, false);
                         if (aesit == AdminExecutorServices.end())                         if (aesit == AdminExecutorServices.end())
                         {                         {
                                 nlwarning("aes '%s' not running, can't run the script", serverAlias.c_str());                                 messageToClient (1, "an aes is not running, can't run the script");
                                  nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
                                 return;                                 return;
                         }                         }
                 }                 }
         }         }
         catch(EConfigFile &)         catch(EConfigFile &)
         {         {
                  messageToClient (1, "bad config file");
                 nlwarning ("bad config file");                 nlwarning ("bad config file");
                 return;                 return;
         }         }
Line 280 
Line 311 
         nlinfo("end of command result");         nlinfo("end of command result");
 } }
  
  // get the service list from the admin exec and send the list to all admin client
 static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
 /*      // get the service list from the admin exec and send the list to all admin client         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId(); 
         aes->Services.clear(); 
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SL");         //
          // Get the list of service from aes
         uint32 nbaes = 1;         //
         msgout.serial (nbaes); 
         msgout.serial (aes->Id); 
  
         uint32 nbs;         uint32 nbs;
         msgin.serial (nbs);         msgin.serial (nbs);
         msgout.serial (nbs); 
  
         for (uint32 i = 0; i < nbs; i++)         for (uint32 i = 0; i < nbs; i++)
         {         {
                 uint32 sid;                 // find the service
                 msgin.serial(sid);                 CService s;
  
                 aes->Services.push_back (CService(sid)); 
                 CService *s = &(aes->Services.back()); 
  
                 msgin.serial(s->ShortName, s->LongName, s->Ready);                 msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
                  msgin.serialCont (s.Commands);
                  s.Connected = true;
  
                 msgout.serial (s->Id, s->ShortName, s->LongName, s->Ready);                 if (!s.AliasName.empty())
                  {
                          SIT sit = aes->findService (s.AliasName, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with alias, update it");
                                  (*sit).setValues (s);
                          }
                  }
                  else
                  {
                          SIT sit = aes->findService (s.Id, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with id, update it");
                                  (*sit).setValues (s);
                          }
                  }
         }         }
         CNetManager::send ("AS", msgout, 0); 
                  
         displayServices ();         displayServices ();
 */} 
          //
          // Send the new list to all admin
          //
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id);
          uint32 ss = aes->Services.size();
          msgout.serial (ss);
  
          for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
          {
                  msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                  msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                  msgout.serialCont ((*sit).Commands);
          }
          CNetManager::send ("AS", msgout, 0);
  }
  
 static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         // get the service list from the admin exec and send the list to all admin client         // get the service list from the admin exec and send the list to all admin client
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         aes->ServiceAliasList.clear ();         aes->ServiceAliasList.clear ();
         msgin.serialCont (aes->ServiceAliasList);         msgin.serialCont (aes->ServiceAliasList);
  
          nlinfo("send SAL to admin callback from aes");
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
         msgout.serial (aes->Id);         msgout.serial (aes->Id);
         msgout.serialCont (aes->ServiceAliasList);         msgout.serialCont (aes->ServiceAliasList);
Line 332 
Line 403 
  
 static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         string alias;         string alias;
Line 365 
Line 436 
                 if (sit == aes->Services.end ())                 if (sit == aes->Services.end ())
                 {                 {
                         // normal case for unknown services                         // normal case for unknown services
                         nlwarning ("new service with alias (%s) but not in my list", alias.c_str());                         nlwarning ("new service without alias and not in my list, add it");
                 }                 }
                 else                 else
                 {                 {
                         nlwarning ("new service without alias is already in my list with id %d", sid);                         nlwarning ("new service without alias is already in my list with id %d, add it", sid);
                 }                 }
                 aes->Services.push_back (CService ());                 aes->Services.push_back (CService ());
                 sit = aes->Services.end();                 sit = aes->Services.end();
Line 380 
Line 451 
         (*sit).AliasName = alias;         (*sit).AliasName = alias;
         (*sit).Connected = true;         (*sit).Connected = true;
         msgin.serial ((*sit).ShortName, (*sit).LongName);         msgin.serial ((*sit).ShortName, (*sit).LongName);
          msgin.serialCont ((*sit).Commands);
  
         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
          msgout.serialCont ((*sit).Commands);
  
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
  
 static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
Line 413 
Line 487 
  
 static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
Line 433 
Line 507 
  
 static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
  
         nlinfo ("*:%d:%d disconnected", aes->Id, sid);         nlinfo ("*:%d:%d disconnected", aes->Id, sid);
  
         SIT sit = aes->findService(sid);         SIT sit = aes->findService(sid, false);
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
         msgout.serial (aes->Id, (*sit).Id);         msgout.serial (aes->Id, sid);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
  
          // the service could disconnect before it's identification, in this case, we don't have it in the service list
          if (sit != aes->Services.end ())
          {
         if ((*sit).InConfig)         if ((*sit).InConfig)
         {         {
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                          (*sit).Commands.clear ();
         }         }
         else         else
         {         {
Line 460 
Line 538 
         }         }
 } }
  
          displayServices ();
  }
  
 // i'm connected to a new admin executor service // i'm connected to a new admin executor service
 void cbAESConnection (const string &serviceName, TSockId from, void *arg) void cbAESConnection (const string &serviceName, TSockId from, void *arg)
 { {
Line 467 
Line 548 
         CAdminExecutorService *aes = &(*aesit);         CAdminExecutorService *aes = &(*aesit);
                  
         // set the appid to find the aes in O(1)         // set the appid to find the aes in O(1)
         from->setAppId ((uint64)aes);         from->setAppId ((uint64)(uint)aes);
  
         aes->Connected = true;         aes->Connected = true;
         nlinfo ("*:%d:* connected", aes->Id);         nlinfo ("*:%d:* connected", aes->Id);
Line 490 
Line 571 
 void cbAESDisconnection (const string &serviceName, TSockId from, void *arg) void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
 { {
         // get the aes with the appid         // get the aes with the appid
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         aes->Connected = false;         aes->Connected = false;
  
         SIT sit;         SIT sit;
         for (sit = aes->Services.begin(); sit != aes->Services.end(); sit++)         for (sit = aes->Services.begin(); sit != aes->Services.end();)
          {
                  // keep only inconfig services
                  if ((*sit).InConfig)
         {         {
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                          sit++;
                  }
                  else
                  {
                          // erase only if it's not a service in the config
                          sit = aes->Services.erase (sit);
                  }
         }         }
  
         nlinfo ("*:%d:* disconnected", aes->Id);         nlinfo ("*:%d:* disconnected", aes->Id);
Line 510 
Line 601 
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 */ */
  
          displayServices ();
  
         // broadcast the new state of this AES         // broadcast the new state of this AES
         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
         uint32 nbaes = 1;         uint32 nbaes = 1;
Line 522 
Line 615 
 { {
         // received an answer for a command, give it to all admin client         // received an answer for a command, give it to all admin client
  
          // get the aes with the appid
          CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         // broadcast the message to the admin service         // broadcast the message to the admin service
         CMessage msgout (CNetManager::getSIDA ("AS"), "LOG");         CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
         string log;         string log;
          uint32 sid;
          msgin.serial (sid);
         msgin.serial (log);         msgin.serial (log);
  
          msgout.serial (aes->Id);
          msgout.serial (sid);
         msgout.serial (log);         msgout.serial (log);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
Line 543 
Line 644 
  
         { "SAL", cbServiceAliasList },         { "SAL", cbServiceAliasList },
  
         { "LOG", cbLog },         { "XLOG", cbLog },
 }; };
  
  
Line 553 
Line 654 
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
 void errorMessage(string message, TSockId from, CCallbackNetBase &netbase) 
 { 
         CMessage msgout (netbase.getSIDA (), "ERR"); 
         msgout.serial (message); 
         netbase.send (msgout, from); 
 } 
  
 // //
 // A new admin client is connected. // A new admin client is connected.
 // //
Line 605 
Line 699 
                                                  
                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                          msgout.serialCont ((*sit).Commands);
                 }                 }
         }         }
         CNetManager::send ("AS", msgout, from);         CNetManager::send ("AS", msgout, from);
  
          displayServices ();
  
         //         //
         // send service alias list         // send service alias list
         //         //
  
          nlinfo("send SAL to admin startup");
  
         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
Line 634 
Line 733 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't execute command, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't execute command, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 657 
Line 756 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't start service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't start service, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 677 
Line 776 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 686 
Line 785 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 708 
Line 807 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 717 
Line 816 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 785 
Line 884 
                 //                 //
  
                 CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");                 CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
                 for (sint i = 0 ; i < host.size (); i+=2)                 sint i;
                  for (i = 0 ; i < host.size (); i+=2)
                 {                 {
                         string serverAlias = host.asString(i);                         string serverAlias = host.asString(i);
                         string serverAddr = host.asString(i+1);                         string serverAddr = host.asString(i+1);
Line 821 
Line 921 
                         s.InConfig = true;                         s.InConfig = true;
                         (*aesit).Services.push_back (s);                         (*aesit).Services.push_back (s);
                 }                 }
         }                 displayServices ();
  
         bool                update () 
         { 
                 return true; 
         }         }
 }; };
  


+
Legend:
+
Removed from v.1.5 
changed lines
 Added in v.1.11
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.13 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.13 new file mode 100644 index 00000000..aac5c93a --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.13 @@ -0,0 +1,547 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.13 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.5 and 1.13

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.5, 2001/05/31 16:44:54version 1.13, 2002/03/01 10:20:32
Line 30 
Line 30 
 #include "nel/net/service.h" #include "nel/net/service.h"
 #include "nel/misc/debug.h" #include "nel/misc/debug.h"
 #include "nel/misc/config_file.h" #include "nel/misc/config_file.h"
  #include "nel/misc/command.h"
  
 #include "nel/net/net_manager.h" #include "nel/net/net_manager.h"
  
Line 51 
Line 52 
         bool        Ready;                        /// true if the service is ready         bool        Ready;                        /// true if the service is ready
         bool        Connected;                /// true if the service is connected to the AES         bool        Connected;                /// true if the service is connected to the AES
         bool        InConfig;                /// true if the service is in the configuration         bool        InConfig;                /// true if the service is in the configuration
          std::vector<NLMISC::CSerialCommand>        Commands;
  
          void setValues (const CService &t)
          {
                  // copy all except gtk stuffs
                  Id = t.Id;
                  AliasName = t.AliasName;
                  ShortName = t.ShortName;
                  LongName = t.LongName;
                  Ready = t.Ready;
                  Connected = t.Connected;
                  //InConfig = t.InConfig; never change the inconfig value
          }
 }; };
  
 typedef list<CService> TServices; typedef list<CService> TServices;
Line 136 
Line 150 
 { {
         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                  nlinfo ("> Admin");
                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                 {                 {
                         nlinfo ("> %s %s %s %d %d", (*aesit).SockId->asString().c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);                         nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
                  }
                 }                 }
         }         }
  
  
  // send a message to a client. if ok is 0 it s an error or it s a normal
  void messageToClient (uint8 ok, string msg, TSockId from = NULL)
  {
          CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
          msgout.serial (ok, msg);
          CNetManager::send ("AS", msgout, from);
 } }
  
  
Line 167 
Line 191 
                 if (StartAllServicesPos*2 >= (uint32)script.size())                 if (StartAllServicesPos*2 >= (uint32)script.size())
                 {                 {
                         StartAllServices = false;                         StartAllServices = false;
  
                         nlinfo("end of the script");                         nlinfo("end of the script");
                         // todo send that the script is finish to the admin                         messageToClient (1, "Start All Service finnished correctly");
                         return;                         return;
                 }                 }
  
Line 184 
Line 209 
                 }                 }
                 catch(EBadSize &)                 catch(EBadSize &)
                 {                 {
                          messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         StartAllServices = false;                         StartAllServices = false;
                         return;                         return;
Line 192 
Line 218 
                 AESIT aesit = findAdminExecutorService (serverAlias, false);                 AESIT aesit = findAdminExecutorService (serverAlias, false);
                 if (aesit == AdminExecutorServices.end())                 if (aesit == AdminExecutorServices.end())
                 {                 {
                         StartAllServices = false;                         messageToClient (1, "don't find the server");
                         nlwarning("don't find the server");                         nlwarning("don't find the server");
                          StartAllServices = false;
                         return;                         return;
                 }                 }
  
Line 218 
Line 245 
         }         }
         catch(EUnknownVar&)         catch(EUnknownVar&)
         {         {
                  messageToClient (1, "'Services' variable is not found");
                 nlwarning ("'Services' variable is not found");                 nlwarning ("'Services' variable is not found");
                 StartAllServices = false;                 StartAllServices = false;
                 return;                 return;
Line 228 
Line 256 
 { {
         if (StartAllServices)         if (StartAllServices)
         {         {
                  messageToClient (1, "already running a script, reset it");
                 nlwarning("already running a script, reset it");                 nlwarning("already running a script, reset it");
                 StartAllServices = false;                 StartAllServices = false;
         }         }
Line 242 
Line 271 
                         AESIT aesit = findAdminExecutorService (serverAlias, false);                         AESIT aesit = findAdminExecutorService (serverAlias, false);
                         if (aesit == AdminExecutorServices.end())                         if (aesit == AdminExecutorServices.end())
                         {                         {
                                 nlwarning("aes '%s' not running, can't run the script", serverAlias.c_str());                                 messageToClient (1, "an aes is not running, can't run the script");
                                  nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
                                 return;                                 return;
                         }                         }
                 }                 }
         }         }
         catch(EConfigFile &)         catch(EConfigFile &)
         {         {
                  messageToClient (1, "bad config file");
                 nlwarning ("bad config file");                 nlwarning ("bad config file");
                 return;                 return;
         }         }
Line 280 
Line 311 
         nlinfo("end of command result");         nlinfo("end of command result");
 } }
  
  // get the service list from the admin exec and send the list to all admin client
 static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
 /*      // get the service list from the admin exec and send the list to all admin client         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId(); 
         aes->Services.clear(); 
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SL");         //
          // Get the list of service from aes
         uint32 nbaes = 1;         //
         msgout.serial (nbaes); 
         msgout.serial (aes->Id); 
  
         uint32 nbs;         uint32 nbs;
         msgin.serial (nbs);         msgin.serial (nbs);
         msgout.serial (nbs); 
  
         for (uint32 i = 0; i < nbs; i++)         for (uint32 i = 0; i < nbs; i++)
         {         {
                 uint32 sid;                 // find the service
                 msgin.serial(sid);                 CService s;
  
                 aes->Services.push_back (CService(sid)); 
                 CService *s = &(aes->Services.back()); 
  
                 msgin.serial(s->ShortName, s->LongName, s->Ready);                 msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
                  msgin.serialCont (s.Commands);
                  s.Connected = true;
  
                 msgout.serial (s->Id, s->ShortName, s->LongName, s->Ready);                 if (!s.AliasName.empty())
                  {
                          SIT sit = aes->findService (s.AliasName, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with alias, update it");
                                  (*sit).setValues (s);
                          }
                  }
                  else
                  {
                          SIT sit = aes->findService (s.Id, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with id, update it");
                                  (*sit).setValues (s);
                          }
                  }
         }         }
         CNetManager::send ("AS", msgout, 0); 
                  
         displayServices ();         displayServices ();
 */} 
          //
          // Send the new list to all admin
          //
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id);
          uint32 ss = aes->Services.size();
          msgout.serial (ss);
  
          for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
          {
                  msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                  msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                  msgout.serialCont ((*sit).Commands);
          }
          CNetManager::send ("AS", msgout, 0);
  }
  
 static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         // get the service list from the admin exec and send the list to all admin client         // get the service list from the admin exec and send the list to all admin client
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         aes->ServiceAliasList.clear ();         aes->ServiceAliasList.clear ();
         msgin.serialCont (aes->ServiceAliasList);         msgin.serialCont (aes->ServiceAliasList);
  
          nlinfo("send SAL to admin callback from aes");
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
         msgout.serial (aes->Id);         msgout.serial (aes->Id);
         msgout.serialCont (aes->ServiceAliasList);         msgout.serialCont (aes->ServiceAliasList);
Line 332 
Line 403 
  
 static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         string alias;         string alias;
Line 365 
Line 436 
                 if (sit == aes->Services.end ())                 if (sit == aes->Services.end ())
                 {                 {
                         // normal case for unknown services                         // normal case for unknown services
                         nlwarning ("new service with alias (%s) but not in my list", alias.c_str());                         nlwarning ("new service without alias and not in my list, add it");
                 }                 }
                 else                 else
                 {                 {
                         nlwarning ("new service without alias is already in my list with id %d", sid);                         nlwarning ("new service without alias is already in my list with id %d, add it", sid);
                 }                 }
                 aes->Services.push_back (CService ());                 aes->Services.push_back (CService ());
                 sit = aes->Services.end();                 sit = aes->Services.end();
Line 380 
Line 451 
         (*sit).AliasName = alias;         (*sit).AliasName = alias;
         (*sit).Connected = true;         (*sit).Connected = true;
         msgin.serial ((*sit).ShortName, (*sit).LongName);         msgin.serial ((*sit).ShortName, (*sit).LongName);
          msgin.serialCont ((*sit).Commands);
  
         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
          msgout.serialCont ((*sit).Commands);
  
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
  
 static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
Line 413 
Line 487 
  
 static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
Line 433 
Line 507 
  
 static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
  
         nlinfo ("*:%d:%d disconnected", aes->Id, sid);         nlinfo ("*:%d:%d disconnected", aes->Id, sid);
  
         SIT sit = aes->findService(sid);         SIT sit = aes->findService(sid, false);
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
         msgout.serial (aes->Id, (*sit).Id);         msgout.serial (aes->Id, sid);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
  
          // the service could disconnect before it's identification, in this case, we don't have it in the service list
          if (sit != aes->Services.end ())
          {
         if ((*sit).InConfig)         if ((*sit).InConfig)
         {         {
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                          (*sit).Commands.clear ();
         }         }
         else         else
         {         {
Line 460 
Line 538 
         }         }
 } }
  
          displayServices ();
  }
  
 // i'm connected to a new admin executor service // i'm connected to a new admin executor service
 void cbAESConnection (const string &serviceName, TSockId from, void *arg) void cbAESConnection (const string &serviceName, TSockId from, void *arg)
 { {
Line 467 
Line 548 
         CAdminExecutorService *aes = &(*aesit);         CAdminExecutorService *aes = &(*aesit);
                  
         // set the appid to find the aes in O(1)         // set the appid to find the aes in O(1)
         from->setAppId ((uint64)aes);         from->setAppId ((uint64)(uint)aes);
  
         aes->Connected = true;         aes->Connected = true;
         nlinfo ("*:%d:* connected", aes->Id);         nlinfo ("*:%d:* connected", aes->Id);
Line 490 
Line 571 
 void cbAESDisconnection (const string &serviceName, TSockId from, void *arg) void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
 { {
         // get the aes with the appid         // get the aes with the appid
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         aes->Connected = false;         aes->Connected = false;
  
         SIT sit;         SIT sit;
         for (sit = aes->Services.begin(); sit != aes->Services.end(); sit++)         for (sit = aes->Services.begin(); sit != aes->Services.end();)
          {
                  // keep only inconfig services
                  if ((*sit).InConfig)
         {         {
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                          sit++;
                  }
                  else
                  {
                          // erase only if it's not a service in the config
                          sit = aes->Services.erase (sit);
                  }
         }         }
  
         nlinfo ("*:%d:* disconnected", aes->Id);         nlinfo ("*:%d:* disconnected", aes->Id);
Line 510 
Line 601 
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 */ */
  
          displayServices ();
  
         // broadcast the new state of this AES         // broadcast the new state of this AES
         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
         uint32 nbaes = 1;         uint32 nbaes = 1;
Line 522 
Line 615 
 { {
         // received an answer for a command, give it to all admin client         // received an answer for a command, give it to all admin client
  
          // get the aes with the appid
          CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         // broadcast the message to the admin service         // broadcast the message to the admin service
         CMessage msgout (CNetManager::getSIDA ("AS"), "LOG");         CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
         string log;         string log;
          uint32 sid;
          msgin.serial (sid);
         msgin.serial (log);         msgin.serial (log);
  
          msgout.serial (aes->Id);
          msgout.serial (sid);
         msgout.serial (log);         msgout.serial (log);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
Line 543 
Line 644 
  
         { "SAL", cbServiceAliasList },         { "SAL", cbServiceAliasList },
  
         { "LOG", cbLog },         { "XLOG", cbLog },
 }; };
  
  
Line 553 
Line 654 
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
 void errorMessage(string message, TSockId from, CCallbackNetBase &netbase) 
 { 
         CMessage msgout (netbase.getSIDA (), "ERR"); 
         msgout.serial (message); 
         netbase.send (msgout, from); 
 } 
  
 // //
 // A new admin client is connected. // A new admin client is connected.
 // //
Line 567 
Line 661 
 { {
         // new client, send him all out info about services         // new client, send him all out info about services
  
         nlinfo ("client %s is connected", from->asString().c_str());         nlinfo ("admin %s is connected", from->asString().c_str());
  
          CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
  }
  
  static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          //
          // Check the validity of the admin
          //
          
          string password;
          bool ok = false;
          try
          {
                  msgin.serial (password);
  
                  if (password == IService::ConfigFile.getVar("Password").asString())
                  {
                          // good authentification
                          ok = true;
                  }
          }
          catch (Exception &)
          {
                  // problem, eject him
          }
  
          if (ok)
          {
                  netbase.authorizeOnly (NULL, from);
                  nlinfo ("Admin authentification success");
          }
          else
          {
                  // bad auth => disconnect
                  netbase.disconnect (from);
                  nlwarning ("Bad admin authentification, tried password: '%s'", password.c_str());
                  return;
          }
  
         //         //
         // send the list of all the aes         // send the list of all the aes
Line 605 
Line 738 
                                                  
                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                          msgout.serialCont ((*sit).Commands);
                 }                 }
         }         }
         CNetManager::send ("AS", msgout, from);         CNetManager::send ("AS", msgout, from);
  
          displayServices ();
  
         //         //
         // send service alias list         // send service alias list
         //         //
  
          nlinfo("send SAL to admin startup");
  
         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
Line 634 
Line 772 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't execute command, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't execute command, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 657 
Line 795 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't start service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't start service, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 677 
Line 815 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 686 
Line 824 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 708 
Line 846 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 717 
Line 855 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 752 
Line 890 
  
 TCallbackItem ClientCallbackArray[] = TCallbackItem ClientCallbackArray[] =
 { {
          { "AUTH", cbAuthenticateClient },
         { "SYS", cbExecuteSystemCommand },         { "SYS", cbExecuteSystemCommand },
         { "STARTS", cbStartService },         { "STARTS", cbStartService },
         { "STOPS", cbStopService },         { "STOPS", cbStopService },
Line 785 
Line 924 
                 //                 //
  
                 CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");                 CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
                 for (sint i = 0 ; i < host.size (); i+=2)                 sint i;
                  for (i = 0 ; i < host.size (); i+=2)
                 {                 {
                         string serverAlias = host.asString(i);                         string serverAlias = host.asString(i);
                         string serverAddr = host.asString(i+1);                         string serverAddr = host.asString(i+1);
Line 821 
Line 961 
                         s.InConfig = true;                         s.InConfig = true;
                         (*aesit).Services.push_back (s);                         (*aesit).Services.push_back (s);
                 }                 }
         }                 displayServices ();
  
         bool                update () 
         { 
                 return true; 
         }         }
 }; };
  


+
Legend:
+
Removed from v.1.5 
changed lines
 Added in v.1.13
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.14 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.14 new file mode 100644 index 00000000..a9c2d137 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.14 @@ -0,0 +1,573 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.14 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.5 and 1.14

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.5, 2001/05/31 16:44:54version 1.14, 2002/03/19 17:42:48
Line 24 
Line 24 
  * MA 02111-1307, USA.  * MA 02111-1307, USA.
  */  */
  
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif // HAVE_CONFIG_H
  
  #ifndef NELNS_CONFIG
  #define NELNS_CONFIG ""
  #endif // NELNS_CONFIG
  
  #ifndef NELNS_LOGS
  #define NELNS_LOGS ""
  #endif // NELNS_LOGS
  
 #include <string> #include <string>
 #include <list> #include <list>
  
 #include "nel/net/service.h" #include "nel/net/service.h"
 #include "nel/misc/debug.h" #include "nel/misc/debug.h"
 #include "nel/misc/config_file.h" #include "nel/misc/config_file.h"
  #include "nel/misc/command.h"
  
 #include "nel/net/net_manager.h" #include "nel/net/net_manager.h"
  
Line 51 
Line 64 
         bool        Ready;                        /// true if the service is ready         bool        Ready;                        /// true if the service is ready
         bool        Connected;                /// true if the service is connected to the AES         bool        Connected;                /// true if the service is connected to the AES
         bool        InConfig;                /// true if the service is in the configuration         bool        InConfig;                /// true if the service is in the configuration
          std::vector<NLMISC::CSerialCommand>        Commands;
  
          void setValues (const CService &t)
          {
                  // copy all except gtk stuffs
                  Id = t.Id;
                  AliasName = t.AliasName;
                  ShortName = t.ShortName;
                  LongName = t.LongName;
                  Ready = t.Ready;
                  Connected = t.Connected;
                  //InConfig = t.InConfig; never change the inconfig value
          }
 }; };
  
 typedef list<CService> TServices; typedef list<CService> TServices;
Line 136 
Line 162 
 { {
         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                  nlinfo ("> Admin");
                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                 {                 {
                         nlinfo ("> %s %s %s %d %d", (*aesit).SockId->asString().c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);                         nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
                 }                 }
         }         }
 } }
  
  
  // send a message to a client. if ok is 0 it s an error or it s a normal
  void messageToClient (uint8 ok, string msg, TSockId from = NULL)
  {
          CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
          msgout.serial (ok, msg);
          CNetManager::send ("AS", msgout, from);
  }
  
  
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////// SCRIPT MANAGER ///////////////////////////////////////////////////////////////////// /////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
Line 167 
Line 203 
                 if (StartAllServicesPos*2 >= (uint32)script.size())                 if (StartAllServicesPos*2 >= (uint32)script.size())
                 {                 {
                         StartAllServices = false;                         StartAllServices = false;
  
                         nlinfo("end of the script");                         nlinfo("end of the script");
                         // todo send that the script is finish to the admin                         messageToClient (1, "Start All Service finnished correctly");
                         return;                         return;
                 }                 }
  
Line 184 
Line 221 
                 }                 }
                 catch(EBadSize &)                 catch(EBadSize &)
                 {                 {
                          messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         StartAllServices = false;                         StartAllServices = false;
                         return;                         return;
Line 192 
Line 230 
                 AESIT aesit = findAdminExecutorService (serverAlias, false);                 AESIT aesit = findAdminExecutorService (serverAlias, false);
                 if (aesit == AdminExecutorServices.end())                 if (aesit == AdminExecutorServices.end())
                 {                 {
                         StartAllServices = false;                         messageToClient (1, "don't find the server");
                         nlwarning("don't find the server");                         nlwarning("don't find the server");
                          StartAllServices = false;
                         return;                         return;
                 }                 }
  
Line 218 
Line 257 
         }         }
         catch(EUnknownVar&)         catch(EUnknownVar&)
         {         {
                  messageToClient (1, "'Services' variable is not found");
                 nlwarning ("'Services' variable is not found");                 nlwarning ("'Services' variable is not found");
                 StartAllServices = false;                 StartAllServices = false;
                 return;                 return;
Line 228 
Line 268 
 { {
         if (StartAllServices)         if (StartAllServices)
         {         {
                  messageToClient (1, "already running a script, reset it");
                 nlwarning("already running a script, reset it");                 nlwarning("already running a script, reset it");
                 StartAllServices = false;                 StartAllServices = false;
         }         }
Line 242 
Line 283 
                         AESIT aesit = findAdminExecutorService (serverAlias, false);                         AESIT aesit = findAdminExecutorService (serverAlias, false);
                         if (aesit == AdminExecutorServices.end())                         if (aesit == AdminExecutorServices.end())
                         {                         {
                                 nlwarning("aes '%s' not running, can't run the script", serverAlias.c_str());                                 messageToClient (1, "an aes is not running, can't run the script");
                                  nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
                                 return;                                 return;
                         }                         }
                 }                 }
         }         }
         catch(EConfigFile &)         catch(EConfigFile &)
         {         {
                  messageToClient (1, "bad config file");
                 nlwarning ("bad config file");                 nlwarning ("bad config file");
                 return;                 return;
         }         }
Line 280 
Line 323 
         nlinfo("end of command result");         nlinfo("end of command result");
 } }
  
  // get the service list from the admin exec and send the list to all admin client
 static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
 /*      // get the service list from the admin exec and send the list to all admin client         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId(); 
         aes->Services.clear(); 
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SL"); 
  
         uint32 nbaes = 1;         //
         msgout.serial (nbaes);         // Get the list of service from aes
         msgout.serial (aes->Id);         //
  
         uint32 nbs;         uint32 nbs;
         msgin.serial (nbs);         msgin.serial (nbs);
         msgout.serial (nbs); 
  
         for (uint32 i = 0; i < nbs; i++)         for (uint32 i = 0; i < nbs; i++)
         {         {
                 uint32 sid;                 // find the service
                 msgin.serial(sid);                 CService s;
  
                 aes->Services.push_back (CService(sid)); 
                 CService *s = &(aes->Services.back()); 
  
                 msgin.serial(s->ShortName, s->LongName, s->Ready);                 msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
                  msgin.serialCont (s.Commands);
                  s.Connected = true;
  
                 msgout.serial (s->Id, s->ShortName, s->LongName, s->Ready);                 if (!s.AliasName.empty())
                  {
                          SIT sit = aes->findService (s.AliasName, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with alias, update it");
                                  (*sit).setValues (s);
                          }
                  }
                  else
                  {
                          SIT sit = aes->findService (s.Id, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with id, update it");
                                  (*sit).setValues (s);
                          }
                  }
         }         }
         CNetManager::send ("AS", msgout, 0); 
                  
         displayServices ();         displayServices ();
 */} 
          //
          // Send the new list to all admin
          //
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id);
          uint32 ss = aes->Services.size();
          msgout.serial (ss);
  
          for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
          {
                  msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                  msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                  msgout.serialCont ((*sit).Commands);
          }
          CNetManager::send ("AS", msgout, 0);
  }
  
 static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         // get the service list from the admin exec and send the list to all admin client         // get the service list from the admin exec and send the list to all admin client
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         aes->ServiceAliasList.clear ();         aes->ServiceAliasList.clear ();
         msgin.serialCont (aes->ServiceAliasList);         msgin.serialCont (aes->ServiceAliasList);
  
          nlinfo("send SAL to admin callback from aes");
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
         msgout.serial (aes->Id);         msgout.serial (aes->Id);
         msgout.serialCont (aes->ServiceAliasList);         msgout.serialCont (aes->ServiceAliasList);
Line 332 
Line 415 
  
 static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         string alias;         string alias;
Line 365 
Line 448 
                 if (sit == aes->Services.end ())                 if (sit == aes->Services.end ())
                 {                 {
                         // normal case for unknown services                         // normal case for unknown services
                         nlwarning ("new service with alias (%s) but not in my list", alias.c_str());                         nlwarning ("new service without alias and not in my list, add it");
                 }                 }
                 else                 else
                 {                 {
                         nlwarning ("new service without alias is already in my list with id %d", sid);                         nlwarning ("new service without alias is already in my list with id %d, add it", sid);
                 }                 }
                 aes->Services.push_back (CService ());                 aes->Services.push_back (CService ());
                 sit = aes->Services.end();                 sit = aes->Services.end();
Line 380 
Line 463 
         (*sit).AliasName = alias;         (*sit).AliasName = alias;
         (*sit).Connected = true;         (*sit).Connected = true;
         msgin.serial ((*sit).ShortName, (*sit).LongName);         msgin.serial ((*sit).ShortName, (*sit).LongName);
          msgin.serialCont ((*sit).Commands);
  
         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
          msgout.serialCont ((*sit).Commands);
  
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
  
 static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
Line 413 
Line 499 
  
 static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
Line 433 
Line 519 
  
 static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         uint32 sid;         uint32 sid;
         msgin.serial (sid);         msgin.serial (sid);
  
         nlinfo ("*:%d:%d disconnected", aes->Id, sid);         nlinfo ("*:%d:%d disconnected", aes->Id, sid);
  
         SIT sit = aes->findService(sid);         SIT sit = aes->findService(sid, false);
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");         CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
         msgout.serial (aes->Id, (*sit).Id);         msgout.serial (aes->Id, sid);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
  
          // the service could disconnect before it's identification, in this case, we don't have it in the service list
          if (sit != aes->Services.end ())
          {
         if ((*sit).InConfig)         if ((*sit).InConfig)
         {         {
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                          (*sit).Commands.clear ();
         }         }
         else         else
         {         {
Line 460 
Line 550 
         }         }
 } }
  
          displayServices ();
  }
  
 // i'm connected to a new admin executor service // i'm connected to a new admin executor service
 void cbAESConnection (const string &serviceName, TSockId from, void *arg) void cbAESConnection (const string &serviceName, TSockId from, void *arg)
 { {
Line 467 
Line 560 
         CAdminExecutorService *aes = &(*aesit);         CAdminExecutorService *aes = &(*aesit);
                  
         // set the appid to find the aes in O(1)         // set the appid to find the aes in O(1)
         from->setAppId ((uint64)aes);         from->setAppId ((uint64)(uint)aes);
  
         aes->Connected = true;         aes->Connected = true;
         nlinfo ("*:%d:* connected", aes->Id);         nlinfo ("*:%d:* connected", aes->Id);
Line 490 
Line 583 
 void cbAESDisconnection (const string &serviceName, TSockId from, void *arg) void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
 { {
         // get the aes with the appid         // get the aes with the appid
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         aes->Connected = false;         aes->Connected = false;
  
         SIT sit;         SIT sit;
         for (sit = aes->Services.begin(); sit != aes->Services.end(); sit++)         for (sit = aes->Services.begin(); sit != aes->Services.end();)
          {
                  // keep only inconfig services
                  if ((*sit).InConfig)
         {         {
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                          sit++;
                  }
                  else
                  {
                          // erase only if it's not a service in the config
                          sit = aes->Services.erase (sit);
                  }
         }         }
  
         nlinfo ("*:%d:* disconnected", aes->Id);         nlinfo ("*:%d:* disconnected", aes->Id);
Line 510 
Line 613 
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 */ */
  
          displayServices ();
  
         // broadcast the new state of this AES         // broadcast the new state of this AES
         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
         uint32 nbaes = 1;         uint32 nbaes = 1;
Line 522 
Line 627 
 { {
         // received an answer for a command, give it to all admin client         // received an answer for a command, give it to all admin client
  
          // get the aes with the appid
          CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
  
         // broadcast the message to the admin service         // broadcast the message to the admin service
         CMessage msgout (CNetManager::getSIDA ("AS"), "LOG");         CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
         string log;         string log;
          uint32 sid;
          msgin.serial (sid);
         msgin.serial (log);         msgin.serial (log);
  
          msgout.serial (aes->Id);
          msgout.serial (sid);
         msgout.serial (log);         msgout.serial (log);
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
Line 543 
Line 656 
  
         { "SAL", cbServiceAliasList },         { "SAL", cbServiceAliasList },
  
         { "LOG", cbLog },         { "XLOG", cbLog },
 }; };
  
  
Line 553 
Line 666 
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
 void errorMessage(string message, TSockId from, CCallbackNetBase &netbase) 
 { 
         CMessage msgout (netbase.getSIDA (), "ERR"); 
         msgout.serial (message); 
         netbase.send (msgout, from); 
 } 
  
 // //
 // A new admin client is connected. // A new admin client is connected.
 // //
Line 567 
Line 673 
 { {
         // new client, send him all out info about services         // new client, send him all out info about services
  
         nlinfo ("client %s is connected", from->asString().c_str());         nlinfo ("admin %s is connected", from->asString().c_str());
  
          CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
  }
  
  static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
  {
          //
          // Check the validity of the admin
          //
          
          string password;
          bool ok = false;
          try
          {
                  msgin.serial (password);
  
                  if (password == IService::ConfigFile.getVar("Password").asString())
                  {
                          // good authentification
                          ok = true;
                  }
          }
          catch (Exception &)
          {
                  // problem, eject him
          }
  
          if (ok)
          {
                  netbase.authorizeOnly (NULL, from);
                  nlinfo ("Admin authentification success");
          }
          else
          {
                  // bad auth => disconnect
                  netbase.disconnect (from);
                  nlwarning ("Bad admin authentification, tried password: '%s'", password.c_str());
                  return;
          }
  
         //         //
         // send the list of all the aes         // send the list of all the aes
Line 605 
Line 750 
                                                  
                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                          msgout.serialCont ((*sit).Commands);
                 }                 }
         }         }
         CNetManager::send ("AS", msgout, from);         CNetManager::send ("AS", msgout, from);
  
          displayServices ();
  
         //         //
         // send service alias list         // send service alias list
         //         //
  
          nlinfo("send SAL to admin startup");
  
         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
Line 634 
Line 784 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't execute command, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't execute command, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 657 
Line 807 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't start service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't start service, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 677 
Line 827 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 686 
Line 836 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 708 
Line 858 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 717 
Line 867 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 752 
Line 902 
  
 TCallbackItem ClientCallbackArray[] = TCallbackItem ClientCallbackArray[] =
 { {
          { "AUTH", cbAuthenticateClient },
         { "SYS", cbExecuteSystemCommand },         { "SYS", cbExecuteSystemCommand },
         { "STARTS", cbStartService },         { "STARTS", cbStartService },
         { "STOPS", cbStopService },         { "STOPS", cbStopService },
Line 785 
Line 936 
                 //                 //
  
                 CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");                 CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
                 for (sint i = 0 ; i < host.size (); i+=2)                 sint i;
                  for (i = 0 ; i < host.size (); i+=2)
                 {                 {
                         string serverAlias = host.asString(i);                         string serverAlias = host.asString(i);
                         string serverAddr = host.asString(i+1);                         string serverAddr = host.asString(i+1);
Line 821 
Line 973 
                         s.InConfig = true;                         s.InConfig = true;
                         (*aesit).Services.push_back (s);                         (*aesit).Services.push_back (s);
                 }                 }
         }                 displayServices ();
  
         bool                update () 
         { 
                 return true; 
         }         }
 }; };
  
Line 834 
Line 982 
 // AESAS is a client connection to the admin executor // AESAS is a client connection to the admin executor
  
 /// Naming Service /// Naming Service
 NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray); NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);


+
Legend:
+
Removed from v.1.5 
changed lines
 Added in v.1.14
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.6 new file mode 100644 index 00000000..733a57bc --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.5&r2=1.6 @@ -0,0 +1,379 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.6 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.5 and 1.6

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.5, 2001/05/31 16:44:54version 1.6, 2001/06/07 16:19:05
Line 51 
Line 51 
         bool        Ready;                        /// true if the service is ready         bool        Ready;                        /// true if the service is ready
         bool        Connected;                /// true if the service is connected to the AES         bool        Connected;                /// true if the service is connected to the AES
         bool        InConfig;                /// true if the service is in the configuration         bool        InConfig;                /// true if the service is in the configuration
          vector<string>        Commands;
  
          void setValues (const CService &t)
          {
                  // copy all except gtk stuffs
                  Id = t.Id;
                  AliasName = t.AliasName;
                  ShortName = t.ShortName;
                  LongName = t.LongName;
                  Ready = t.Ready;
                  Connected = t.Connected;
                  //InConfig = t.InConfig; never change the inconfig value
          }
 }; };
  
 typedef list<CService> TServices; typedef list<CService> TServices;
Line 136 
Line 149 
 { {
         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                  nlinfo ("> Admin");
                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)                 for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
                 {                 {
                         nlinfo ("> %s %s %s %d %d", (*aesit).SockId->asString().c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);                         nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
                 }                 }
         }         }
 } }
  
  
  // send a message to a client. if ok is 0 it s an error or it s a normal
  void messageToClient (uint8 ok, string msg, TSockId from = NULL)
  {
          CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
          msgout.serial (ok, msg);
          CNetManager::send ("AS", msgout, from);
  }
  
  
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////// SCRIPT MANAGER ///////////////////////////////////////////////////////////////////// /////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
Line 167 
Line 190 
                 if (StartAllServicesPos*2 >= (uint32)script.size())                 if (StartAllServicesPos*2 >= (uint32)script.size())
                 {                 {
                         StartAllServices = false;                         StartAllServices = false;
  
                         nlinfo("end of the script");                         nlinfo("end of the script");
                         // todo send that the script is finish to the admin                         messageToClient (1, "Start All Service finnished correctly");
                         return;                         return;
                 }                 }
  
Line 184 
Line 208 
                 }                 }
                 catch(EBadSize &)                 catch(EBadSize &)
                 {                 {
                          messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");                         nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
                         StartAllServices = false;                         StartAllServices = false;
                         return;                         return;
Line 192 
Line 217 
                 AESIT aesit = findAdminExecutorService (serverAlias, false);                 AESIT aesit = findAdminExecutorService (serverAlias, false);
                 if (aesit == AdminExecutorServices.end())                 if (aesit == AdminExecutorServices.end())
                 {                 {
                         StartAllServices = false;                         messageToClient (1, "don't find the server");
                         nlwarning("don't find the server");                         nlwarning("don't find the server");
                          StartAllServices = false;
                         return;                         return;
                 }                 }
  
Line 218 
Line 244 
         }         }
         catch(EUnknownVar&)         catch(EUnknownVar&)
         {         {
                  messageToClient (1, "'Services' variable is not found");
                 nlwarning ("'Services' variable is not found");                 nlwarning ("'Services' variable is not found");
                 StartAllServices = false;                 StartAllServices = false;
                 return;                 return;
Line 228 
Line 255 
 { {
         if (StartAllServices)         if (StartAllServices)
         {         {
                  messageToClient (1, "already running a script, reset it");
                 nlwarning("already running a script, reset it");                 nlwarning("already running a script, reset it");
                 StartAllServices = false;                 StartAllServices = false;
         }         }
Line 242 
Line 270 
                         AESIT aesit = findAdminExecutorService (serverAlias, false);                         AESIT aesit = findAdminExecutorService (serverAlias, false);
                         if (aesit == AdminExecutorServices.end())                         if (aesit == AdminExecutorServices.end())
                         {                         {
                                 nlwarning("aes '%s' not running, can't run the script", serverAlias.c_str());                                 messageToClient (1, "an aes is not running, can't run the script");
                                  nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
                                 return;                                 return;
                         }                         }
                 }                 }
         }         }
         catch(EConfigFile &)         catch(EConfigFile &)
         {         {
                  messageToClient (1, "bad config file");
                 nlwarning ("bad config file");                 nlwarning ("bad config file");
                 return;                 return;
         }         }
Line 280 
Line 310 
         nlinfo("end of command result");         nlinfo("end of command result");
 } }
  
  // get the service list from the admin exec and send the list to all admin client
 static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
 /*      // get the service list from the admin exec and send the list to all admin client 
         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();         CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
         aes->Services.clear(); 
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SL"); 
  
         uint32 nbaes = 1;         //
         msgout.serial (nbaes);         // Get the list of service from aes
         msgout.serial (aes->Id);         //
  
         uint32 nbs;         uint32 nbs;
         msgin.serial (nbs);         msgin.serial (nbs);
         msgout.serial (nbs); 
  
         for (uint32 i = 0; i < nbs; i++)         for (uint32 i = 0; i < nbs; i++)
         {         {
                 uint32 sid;                 // find the service
                 msgin.serial(sid);                 CService s;
  
                 aes->Services.push_back (CService(sid)); 
                 CService *s = &(aes->Services.back()); 
  
                 msgin.serial(s->ShortName, s->LongName, s->Ready);                 msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
                  msgin.serialCont (s.Commands);
                  s.Connected = true;
  
                 msgout.serial (s->Id, s->ShortName, s->LongName, s->Ready);                 if (!s.AliasName.empty())
                  {
                          SIT sit = aes->findService (s.AliasName, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with alias, update it");
                                  (*sit).setValues (s);
                          }
                  }
                  else
                  {
                          SIT sit = aes->findService (s.Id, false);
                          if (sit == aes->Services.end ())
                          {
                                  aes->Services.push_back (s);
                          }
                          else
                          {
                                  nlassert ("the service already exists with id, update it");
                                  (*sit).setValues (s);
                          }
                  }
         }         }
         CNetManager::send ("AS", msgout, 0); 
                  
         displayServices ();         displayServices ();
 */} 
          //
          // Send the new list to all admin
          //
  
          CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
          uint32 nbaes = 1;
          msgout.serial (nbaes);
          msgout.serial (aes->Id);
          uint32 ss = aes->Services.size();
          msgout.serial (ss);
  
          for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
          {
                  msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                  msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                  msgout.serialCont ((*sit).Commands);
          }
          CNetManager::send ("AS", msgout, 0);
  }
  
 static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase) static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
 { {
Line 321 
Line 389 
         aes->ServiceAliasList.clear ();         aes->ServiceAliasList.clear ();
         msgin.serialCont (aes->ServiceAliasList);         msgin.serialCont (aes->ServiceAliasList);
  
          nlinfo("send SAL to admin callback from aes");
  
         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");         CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
         msgout.serial (aes->Id);         msgout.serial (aes->Id);
         msgout.serialCont (aes->ServiceAliasList);         msgout.serialCont (aes->ServiceAliasList);
Line 365 
Line 435 
                 if (sit == aes->Services.end ())                 if (sit == aes->Services.end ())
                 {                 {
                         // normal case for unknown services                         // normal case for unknown services
                         nlwarning ("new service with alias (%s) but not in my list", alias.c_str());                         nlwarning ("new service without alias and not in my list, add it");
                 }                 }
                 else                 else
                 {                 {
                         nlwarning ("new service without alias is already in my list with id %d", sid);                         nlwarning ("new service without alias is already in my list with id %d, add it", sid);
                 }                 }
                 aes->Services.push_back (CService ());                 aes->Services.push_back (CService ());
                 sit = aes->Services.end();                 sit = aes->Services.end();
Line 380 
Line 450 
         (*sit).AliasName = alias;         (*sit).AliasName = alias;
         (*sit).Connected = true;         (*sit).Connected = true;
         msgin.serial ((*sit).ShortName, (*sit).LongName);         msgin.serial ((*sit).ShortName, (*sit).LongName);
          msgin.serialCont ((*sit).Commands);
  
         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());         nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
  
         // broadcast the message to all admin client         // broadcast the message to all admin client
         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");         CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);         msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
          msgout.serialCont ((*sit).Commands);
  
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 } }
  
Line 458 
Line 531 
                 // erase only if it's not a service in the config                 // erase only if it's not a service in the config
                 aes->Services.erase (sit);                 aes->Services.erase (sit);
         }         }
  
          displayServices ();
 } }
  
 // i'm connected to a new admin executor service // i'm connected to a new admin executor service
Line 495 
Line 570 
         aes->Connected = false;         aes->Connected = false;
  
         SIT sit;         SIT sit;
         for (sit = aes->Services.begin(); sit != aes->Services.end(); sit++)         for (sit = aes->Services.begin(); sit != aes->Services.end();)
          {
                  // keep only inconfig services
                  if ((*sit).InConfig)
         {         {
                 (*sit).Id = 0xFFFFFFFF;                 (*sit).Id = 0xFFFFFFFF;
                 (*sit).ShortName = (*sit).LongName = "";                 (*sit).ShortName = (*sit).LongName = "";
                 (*sit).Ready = (*sit).Connected = false;                 (*sit).Ready = (*sit).Connected = false;
                          sit++;
                  }
                  else
                  {
                          // erase only if it's not a service in the config
                          sit = aes->Services.erase (sit);
                  }
         }         }
  
         nlinfo ("*:%d:* disconnected", aes->Id);         nlinfo ("*:%d:* disconnected", aes->Id);
Line 510 
Line 595 
         CNetManager::send ("AS", msgout, 0);         CNetManager::send ("AS", msgout, 0);
 */ */
  
          displayServices ();
  
         // broadcast the new state of this AES         // broadcast the new state of this AES
         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");         CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
         uint32 nbaes = 1;         uint32 nbaes = 1;
Line 553 
Line 640 
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////
  
 void errorMessage(string message, TSockId from, CCallbackNetBase &netbase) 
 { 
         CMessage msgout (netbase.getSIDA (), "ERR"); 
         msgout.serial (message); 
         netbase.send (msgout, from); 
 } 
  
 // //
 // A new admin client is connected. // A new admin client is connected.
 // //
Line 605 
Line 685 
                                                  
                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);                         msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);                         msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
                          msgout.serialCont ((*sit).Commands);
                 }                 }
         }         }
         CNetManager::send ("AS", msgout, from);         CNetManager::send ("AS", msgout, from);
  
          displayServices ();
  
         //         //
         // send service alias list         // send service alias list
         //         //
  
          nlinfo("send SAL to admin startup");
  
         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)         for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
         {         {
                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");                 CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
Line 634 
Line 719 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't execute command, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't execute command, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 657 
Line 742 
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 errorMessage ("couldn't start service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't start service, as didn't find the aes", from);
                 return;                 return;
         }         }
  
Line 677 
Line 762 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 686 
Line 771 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 708 
Line 793 
         AESIT aesit = findAdminExecutorService (aesid, false);         AESIT aesit = findAdminExecutorService (aesid, false);
         if (aesit == AdminExecutorServices.end())         if (aesit == AdminExecutorServices.end())
         {         {
                 errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the aes", from);
                 // don't find the aes, send an error message                 // don't find the aes, send an error message
                 return;                 return;
         }         }
Line 717 
Line 802 
         if (sit == (*aesit).Services.end())         if (sit == (*aesit).Services.end())
         {         {
                 // don't find the s, send an error message                 // don't find the s, send an error message
                 errorMessage ("couldn't stop service, as didn't find the service", from, netbase);                 messageToClient (0, "couldn't stop service, as didn't find the service", from);
                 return;                 return;
         }         }
  
Line 821 
Line 906 
                         s.InConfig = true;                         s.InConfig = true;
                         (*aesit).Services.push_back (s);                         (*aesit).Services.push_back (s);
                 }                 }
                  displayServices ();
         }         }
  
         bool                update ()         bool                update ()


+
Legend:
+
Removed from v.1.5 
changed lines
 Added in v.1.6
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.7&r2=1.8 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.7&r2=1.8 new file mode 100644 index 00000000..aeb87448 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp.diff?r1=1.7&r2=1.8 @@ -0,0 +1,29 @@ + + + +code/nelns/admin_service/admin_service.cpp - diff - 1.8 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.cpp between version 1.7 and 1.8

+ + + + + + + + + + + + +
version 1.7, 2001/06/18 14:43:31version 1.8, 2001/06/18 14:54:06
Line 542 
Line 542 
         CAdminExecutorService *aes = &(*aesit);         CAdminExecutorService *aes = &(*aesit);
                  
         // set the appid to find the aes in O(1)         // set the appid to find the aes in O(1)
         from->setAppId ((uint64)aes);         from->setAppId ((uint64)(uint)aes);
  
         aes->Connected = true;         aes->Connected = true;
         nlinfo ("*:%d:* connected", aes->Id);         nlinfo ("*:%d:* connected", aes->Id);


+
Legend:
+
Removed from v.1.7 
changed lines
 Added in v.1.8
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.14 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.14 new file mode 100644 index 00000000..3b3eb0f3 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.14 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.cpp - annotate - 1.14 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.cpp, Revision 1.14

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.15 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.15 new file mode 100644 index 00000000..59d73165 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.15 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.cpp - annotate - 1.15 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.cpp, Revision 1.15

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.7 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.7 new file mode 100644 index 00000000..6921ef0a --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.7 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.cpp - annotate - 1.7 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.cpp, Revision 1.7

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.9 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.9 new file mode 100644 index 00000000..9c9c8398 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?annotate=1.9 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.cpp - annotate - 1.9 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.cpp, Revision 1.9

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?content-type=text/x-cvsweb-markup&rev=1.14 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?content-type=text/x-cvsweb-markup&rev=1.14 new file mode 100644 index 00000000..1134159b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?content-type=text/x-cvsweb-markup&rev=1.14 @@ -0,0 +1,999 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.14 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.14, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN +
Changes since 1.13: +14 -2 + lines
+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.14 2002/03/19 17:42:48 valignat Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif // HAVE_CONFIG_H
+
+#ifndef NELNS_CONFIG
+#define NELNS_CONFIG ""
+#endif // NELNS_CONFIG
+
+#ifndef NELNS_LOGS
+#define NELNS_LOGS ""
+#endif // NELNS_LOGS
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid, false);
+        
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // the service could disconnect before it's identification, in this case, we don't have it in the service list
+        if (sit != aes->Services.end ())
+        {
+                if ((*sit).InConfig)
+                {
+                        (*sit).Ready = (*sit).Connected = false;
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Commands.clear ();
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        aes->Services.erase (sit);
+                }
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("admin %s is connected", from->asString().c_str());
+
+        CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
+}
+
+static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        //
+        // Check the validity of the admin
+        //
+        
+        string password;
+        bool ok = false;
+        try
+        {
+                msgin.serial (password);
+
+                if (password == IService::ConfigFile.getVar("Password").asString())
+                {
+                        // good authentification
+                        ok = true;
+                }
+        }
+        catch (Exception &)
+        {
+                // problem, eject him
+        }
+
+        if (ok)
+        {
+                netbase.authorizeOnly (NULL, from);
+                nlinfo ("Admin authentification success");
+        }
+        else
+        {
+                // bad auth => disconnect
+                netbase.disconnect (from);
+                nlwarning ("Bad admin authentification, tried password: '%s'", password.c_str());
+                return;
+        }
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "AUTH", cbAuthenticateClient },
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.11 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.11 new file mode 100644 index 00000000..00d382c1 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.11 @@ -0,0 +1,286 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 + to selected 1.11 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 + to selected 1.11 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.11 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [selected], Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.11 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.11 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 + to selected 1.11 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 + to selected 1.11 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 + to selected 1.11 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 + to selected 1.11 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 + to selected 1.11 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 + to selected 1.11 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 + to selected 1.11 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.11 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.14 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.14 new file mode 100644 index 00000000..546c08e8 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.14 @@ -0,0 +1,286 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [selected], Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.14 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 + to selected 1.14 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 + to selected 1.14 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.14 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.14 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 + to selected 1.14 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 + to selected 1.14 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 + to selected 1.14 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 + to selected 1.14 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 + to selected 1.14 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 + to selected 1.14 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 + to selected 1.14 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.14 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.15 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.15 new file mode 100644 index 00000000..a82ce1c0 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.15 @@ -0,0 +1,287 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [selected], Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 + to selected 1.15 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.15 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 + to selected 1.15 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 + to selected 1.15 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.15 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.15 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 + to selected 1.15 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 + to selected 1.15 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 + to selected 1.15 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 + to selected 1.15 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 + to selected 1.15 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 + to selected 1.15 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 + to selected 1.15 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.15 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.2 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.2 new file mode 100644 index 00000000..621da126 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.2 @@ -0,0 +1,286 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 + to selected 1.2 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 + to selected 1.2 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.2 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 + to selected 1.2 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 + to selected 1.2 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.2 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.2 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 + to selected 1.2 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 + to selected 1.2 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 + to selected 1.2 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 + to selected 1.2 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 + to selected 1.2 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [selected], Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.2 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.4 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.4 new file mode 100644 index 00000000..0ee6f961 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.4 @@ -0,0 +1,286 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 + to selected 1.4 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 + to selected 1.4 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.4 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 + to selected 1.4 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 + to selected 1.4 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.4 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.4 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 + to selected 1.4 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 + to selected 1.4 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 + to selected 1.4 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [selected], Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 + to selected 1.4 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 + to selected 1.4 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.4 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.6 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.6 new file mode 100644 index 00000000..334a4355 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.6 @@ -0,0 +1,286 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 + to selected 1.6 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 + to selected 1.6 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.6 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 + to selected 1.6 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 + to selected 1.6 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.6 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.6 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 + to selected 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [selected], Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 + to selected 1.6 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 + to selected 1.6 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 + to selected 1.6 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 + to selected 1.6 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.6 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.7 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.7 new file mode 100644 index 00000000..a72d0297 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?r1=1.7 @@ -0,0 +1,286 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 + to selected 1.7 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 + to selected 1.7 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 + to selected 1.7 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 + to selected 1.7 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 + to selected 1.7 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 + to selected 1.7 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 + to selected 1.7 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [selected], Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 + to selected 1.7 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 + to selected 1.7 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 + to selected 1.7 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 + to selected 1.7 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 + to selected 1.7 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.7 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.10&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.10&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..70e1502b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.10&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,943 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.10 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.10, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN +
Changes since 1.9: +1 -6 + lines
+REMOVED: update()
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.10 2001/07/05 08:26:07 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, (*sit).Id);
+        CNetManager::send ("AS", msgout, 0);
+
+        if ((*sit).InConfig)
+        {
+                (*sit).Ready = (*sit).Connected = false;
+                (*sit).Id = 0xFFFFFFFF;
+                (*sit).ShortName = (*sit).LongName = "";
+                (*sit).Commands.clear ();
+        }
+        else
+        {
+                // erase only if it's not a service in the config
+                aes->Services.erase (sit);
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("client %s is connected", from->asString().c_str());
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.11&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.11&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..ee08cca2 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.11&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,947 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.11 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.11, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN +
Changes since 1.10: +18 -14 + lines
+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.11 2001/07/10 16:49:53 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid, false);
+        
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // the service could disconnect before it's identification, in this case, we don't have it in the service list
+        if (sit != aes->Services.end ())
+        {
+                if ((*sit).InConfig)
+                {
+                        (*sit).Ready = (*sit).Connected = false;
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Commands.clear ();
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        aes->Services.erase (sit);
+                }
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("client %s is connected", from->asString().c_str());
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.12&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.12&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..f9dda49d --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.12&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,995 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.12 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.12, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN +
Changes since 1.11: +50 -2 + lines
+ADDED: login password
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.12 2002/02/15 17:07:43 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid, false);
+        
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // the service could disconnect before it's identification, in this case, we don't have it in the service list
+        if (sit != aes->Services.end ())
+        {
+                if ((*sit).InConfig)
+                {
+                        (*sit).Ready = (*sit).Connected = false;
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Commands.clear ();
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        aes->Services.erase (sit);
+                }
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("admin %s is connected", from->asString().c_str());
+
+        CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
+}
+
+static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        //
+        // Check the validity of the admin
+        //
+        
+        string login, password;
+        bool ok = false;
+        try
+        {
+                msgin.serial (login, password);
+
+                CConfigFile::CVar &users = IService::ConfigFile.getVar("Users");
+                for (sint i = 0 ; i < users.size (); i+=2)
+                {
+                        if (login == users.asString(i))
+                        {
+                                if (password == users.asString(i + 1))
+                                {
+                                        // good authentification
+                                        ok = true;
+                                }
+                                break;
+                        }
+                }
+        }
+        catch (Exception &)
+        {
+                // problem, eject him
+        }
+
+        if (ok)
+        {
+                netbase.authorizeOnly (NULL, from);
+                nlinfo ("Admin authentification success login: '%s'", login.c_str());
+        }
+        else
+        {
+                // bad auth => disconnect
+                netbase.disconnect (from);
+                nlwarning ("Bad admin authentification try login: '%s' password: '%s'", login.c_str(), password.c_str());
+                return;
+        }
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "AUTH", cbAuthenticateClient },
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=author/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=author/index.html new file mode 100644 index 00000000..9f531956 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=author/index.html @@ -0,0 +1,1001 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.15 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.15, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.14: +8 -6 + lines
+CHANGED: use new service functions
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.15 2002/03/25 09:28:00 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif // HAVE_CONFIG_H
+
+#ifndef NELNS_CONFIG
+#define NELNS_CONFIG ""
+#endif // NELNS_CONFIG
+
+#ifndef NELNS_LOGS
+#define NELNS_LOGS ""
+#endif // NELNS_LOGS
+
+#include "nel/misc/types_nl.h"
+
+#include <string>
+#include <list>
+
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/service.h"
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid, false);
+        
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // the service could disconnect before it's identification, in this case, we don't have it in the service list
+        if (sit != aes->Services.end ())
+        {
+                if ((*sit).InConfig)
+                {
+                        (*sit).Ready = (*sit).Connected = false;
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Commands.clear ();
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        aes->Services.erase (sit);
+                }
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("admin %s is connected", from->asString().c_str());
+
+        CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
+}
+
+static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        //
+        // Check the validity of the admin
+        //
+        
+        string password;
+        bool ok = false;
+        try
+        {
+                msgin.serial (password);
+
+                if (password == IService::getInstance()->ConfigFile.getVar("Password").asString())
+                {
+                        // good authentification
+                        ok = true;
+                }
+        }
+        catch (Exception &)
+        {
+                // problem, eject him
+        }
+
+        if (ok)
+        {
+                netbase.authorizeOnly (NULL, from);
+                nlinfo ("Admin authentification success");
+        }
+        else
+        {
+                // bad auth => disconnect
+                netbase.disconnect (from);
+                nlwarning ("Bad admin authentification, tried password: '%s'", password.c_str());
+                return;
+        }
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "AUTH", cbAuthenticateClient },
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_OLD_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=log/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=log/index.html new file mode 100644 index 00000000..b0b2ec7c --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=log/index.html @@ -0,0 +1,1001 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.15 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.15, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.14: +8 -6 + lines
+CHANGED: use new service functions
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.15 2002/03/25 09:28:00 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif // HAVE_CONFIG_H
+
+#ifndef NELNS_CONFIG
+#define NELNS_CONFIG ""
+#endif // NELNS_CONFIG
+
+#ifndef NELNS_LOGS
+#define NELNS_LOGS ""
+#endif // NELNS_LOGS
+
+#include "nel/misc/types_nl.h"
+
+#include <string>
+#include <list>
+
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/service.h"
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid, false);
+        
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // the service could disconnect before it's identification, in this case, we don't have it in the service list
+        if (sit != aes->Services.end ())
+        {
+                if ((*sit).InConfig)
+                {
+                        (*sit).Ready = (*sit).Connected = false;
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Commands.clear ();
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        aes->Services.erase (sit);
+                }
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("admin %s is connected", from->asString().c_str());
+
+        CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
+}
+
+static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        //
+        // Check the validity of the admin
+        //
+        
+        string password;
+        bool ok = false;
+        try
+        {
+                msgin.serial (password);
+
+                if (password == IService::getInstance()->ConfigFile.getVar("Password").asString())
+                {
+                        // good authentification
+                        ok = true;
+                }
+        }
+        catch (Exception &)
+        {
+                // problem, eject him
+        }
+
+        if (ok)
+        {
+                netbase.authorizeOnly (NULL, from);
+                nlinfo ("Admin authentification success");
+        }
+        else
+        {
+                // bad auth => disconnect
+                netbase.disconnect (from);
+                nlwarning ("Bad admin authentification, tried password: '%s'", password.c_str());
+                return;
+        }
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "AUTH", cbAuthenticateClient },
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_OLD_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=rev/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=rev/index.html new file mode 100644 index 00000000..bbedf7ae --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.15&content-type=text/x-cvsweb-markup&sortby=rev/index.html @@ -0,0 +1,1001 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.15 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.15, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.14: +8 -6 + lines
+CHANGED: use new service functions
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.15 2002/03/25 09:28:00 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif // HAVE_CONFIG_H
+
+#ifndef NELNS_CONFIG
+#define NELNS_CONFIG ""
+#endif // NELNS_CONFIG
+
+#ifndef NELNS_LOGS
+#define NELNS_LOGS ""
+#endif // NELNS_LOGS
+
+#include "nel/misc/types_nl.h"
+
+#include <string>
+#include <list>
+
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/service.h"
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::getInstance()->ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid, false);
+        
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // the service could disconnect before it's identification, in this case, we don't have it in the service list
+        if (sit != aes->Services.end ())
+        {
+                if ((*sit).InConfig)
+                {
+                        (*sit).Ready = (*sit).Connected = false;
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Commands.clear ();
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        aes->Services.erase (sit);
+                }
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("admin %s is connected", from->asString().c_str());
+
+        CNetManager::getNetBase(serviceName)->authorizeOnly ("AUTH", from);
+}
+
+static void cbAuthenticateClient (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        //
+        // Check the validity of the admin
+        //
+        
+        string password;
+        bool ok = false;
+        try
+        {
+                msgin.serial (password);
+
+                if (password == IService::getInstance()->ConfigFile.getVar("Password").asString())
+                {
+                        // good authentification
+                        ok = true;
+                }
+        }
+        catch (Exception &)
+        {
+                // problem, eject him
+        }
+
+        if (ok)
+        {
+                netbase.authorizeOnly (NULL, from);
+                nlinfo ("Admin authentification success");
+        }
+        else
+        {
+                // bad auth => disconnect
+                netbase.disconnect (from);
+                nlwarning ("Bad admin authentification, tried password: '%s'", password.c_str());
+                return;
+        }
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "AUTH", cbAuthenticateClient },
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_OLD_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray, NELNS_CONFIG, NELNS_LOGS);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.2&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.2&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..eb84b26f --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.2&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,253 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.2 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.2, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN +
Changes since 1.1: +2 -6 + lines
+BUGFIX: now compile on linux
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.2 2001/05/03 13:19:13 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX D.T.C. SYSTEM.
+ * NEVRAX D.T.C. SYSTEM is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX D.T.C. SYSTEM is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX D.T.C. SYSTEM; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+
+#include "nel/net/net_manager.h"
+
+ 
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+
+struct CService
+{
+        CService(TSockId s) : AESSockId(s), AESId(NextAESId++) { }
+
+        TSockId        AESSockId;                // TSockId of the AES that have this service
+        uint32        AESId;                        // TSockId of the AES that have this service
+        uint32        SId;                        // uint32 to identify the service
+        string        ShortName;
+        string        LongName;
+
+private:
+
+        static        uint32 NextAESId;
+};
+
+uint32 CService::NextAESId = 0;
+
+list<CService> Services;
+typedef list<CService>::iterator sit;
+
+sit find (TSockId aesid, uint32 sid)
+{
+        sit it;
+        for (it = Services.begin(); it != Services.end(); it++)
+        {
+                if ((*it).AESSockId== aesid && (*it).SId == sid) break;
+        }
+        return it;
+}
+
+sit find (uint32 aesid, uint32 sid)
+{
+        sit it;
+        for (it = Services.begin(); it != Services.end(); it++)
+        {
+                if ((*it).AESId == aesid && (*it).SId == sid) break;
+        }
+        return it;
+}
+
+/*
+NLMISC_COMMAND (start, "start a service", "<service_name>")
+{
+        if(args.size() != 1 && args.size() != 2) return false;
+
+        CMessage msgout (CNetManager::getSIDA("AES"), "ESC");
+        msgout.serial (args[1]);
+
+        uint8 background = 0;
+
+        if (args.size() == 2)
+        {
+                if (args[1] == "&")
+                        uint8 background = 1;
+                else
+                        return false;
+        }
+
+        msgout.serial (background);
+        CNetManager::send ("AES", msgout);
+        return true;
+}
+
+
+CLog logstdout;
+CStdDisplayer dispstdout;
+
+NLMISC_COMMAND (stop, "stop a service", "<aesid> <sid>")
+{
+        if(args.size() != 3) return false;
+
+        CMessage msgout (CNetManager::getSIDA("AES"), "SS");
+        msgout.serial (args[2]);
+        CNetManager::send ("AES", msgout);
+}
+*/
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string ShortName, LongName;
+
+        msgin.serial (ShortName);
+        msgin.serial (LongName);
+
+        nlinfo ("%s %s %s is identified", from->asString().c_str(), ShortName.c_str(), LongName.c_str());
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string ShortName, LongName;
+
+        msgin.serial (ShortName);
+        msgin.serial (LongName);
+
+        nlinfo ("%s %s %s is ready", from->asString().c_str(), ShortName.c_str(), LongName.c_str());
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        nlinfo ("%s a service is connected", from->asString().c_str());
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string ShortName, LongName;
+
+        msgin.serial (ShortName);
+        msgin.serial (LongName);
+
+        nlinfo ("%s %s %s is disconnected", from->asString().c_str(), ShortName.c_str(), LongName.c_str());
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("client %s is connected", from->asString().c_str());
+        
+        CMessage msgout (CNetManager::getSIDA ("AESAS"), "SL");
+        uint32 size = (uint32)Services.size();
+        msgout.serial (size);
+        for (sit it = Services.begin(); it != Services.end(); it++)
+        {
+                msgout.serial ((*it).AESId);
+                msgout.serial ((*it).SId);
+                msgout.serial ((*it).ShortName);
+                msgout.serial ((*it).LongName);
+        }
+        CNetManager::send ("AS", msgout, from);
+}
+
+TCallbackItem ASCallbackArray[] =
+{
+        { "", NULL },
+};
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                // connec to the AES
+                CNetManager::addClient ("AES", "localhost:49996");
+                CNetManager::addCallbackArray ("AES", AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+
+        }
+
+        bool                update ()
+        {
+                return true;
+        }
+};
+
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ASCallbackArray);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.4&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.4&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..0e23cd2d --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.4&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,756 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.4 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.4, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN +
Changes since 1.3: +405 -101 + lines
+ADDED: work in progress. added gtk
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.4 2001/05/18 16:51:33 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32        Id;                                /// uint32 to identify the service
+        string        ServiceAlias;        /// alias of the service used in the AES and AS to find him (unique per AES)
+        string        ShortName;                /// name of the service in short format ("NS" for example)
+        string        LongName;                /// name of the service in long format ("naming_service")
+        bool        Ready;                        /// true if the service is ready
+        bool        Connected;                /// true if the service is connected to the AES
+        bool        InConfig;                /// true if the service is in the configuration
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("> %s %s %s %d %d", (*aesit).SockId->asString().c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool ScriptRunning = false;
+string ScriptName;
+uint32 ScriptPos;
+
+void doNextScriptStep ()
+{
+        nlassert (ScriptRunning);
+
+
+        // get the script
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar(ScriptName);
+
+                // check the position
+
+                if (ScriptPos*2 >= (uint32)script.size())
+                {
+                        ScriptRunning = false;
+                        nlinfo("end of the script");
+                        // todo send that the script is finish to the admin
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (ScriptPos*2);
+                        serviceAlias = script.asString (ScriptPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        nlwarning ("script '%s' not contains a good number of entries (must be a multiple of 2)", ScriptName.c_str());
+                        ScriptRunning = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        ScriptRunning = false;
+                        nlwarning("don't find the server");
+                        return;
+                }
+
+                // send the resquest to the AES
+
+                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                msgout.serial (serviceAlias);
+                CNetManager::send ((*aesit).ServerAlias, msgout);
+
+                ScriptPos++;
+        }
+        catch(EUnknownVar&)
+        {
+                nlwarning ("script '%s' not found", ScriptName.c_str());
+                ScriptRunning = false;
+                return;
+        }
+}
+
+void initScript(string scriptName)
+{
+        if (ScriptRunning)
+        {
+                nlwarning("already running a script, reset it");
+                ScriptRunning = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar(scriptName);
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                nlwarning("aes not running, can't run the script");
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                nlwarning ("bad config file");
+                return;
+        }
+
+        ScriptName = scriptName;
+        ScriptPos = 0;
+        ScriptRunning = true;
+
+        doNextScriptStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+/*      // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+        aes->Services.clear();
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SL");
+
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+
+        uint32 nbs;
+        msgin.serial (nbs);
+        msgout.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                uint32 sid;
+                msgin.serial(sid);
+
+                aes->Services.push_back (CService(sid));
+                CService *s = &(aes->Services.back());
+
+                msgin.serial(s->ShortName, s->LongName, s->Ready);
+
+                msgout.serial (s->Id, s->ShortName, s->LongName, s->Ready);
+        }
+        CNetManager::send ("AS", msgout, 0);
+        
+        displayServices ();
+*/}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s'", aes->Id, sid, (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).ShortName, (*sit).LongName);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (ScriptRunning)
+                doNextScriptStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+/*      CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        aes->Services.push_back (CService(sid));
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+*/}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, (*sit).Id);
+        CNetManager::send ("AS", msgout, 0);
+
+        aes->Services.erase (sit);
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*      
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) from->appId();
+
+        aes->Connected = false;
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "LOG");
+        string log;
+        msgin.serial (log);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "LOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void errorMessage(string message, TSockId from, CCallbackNetBase &netbase)
+{
+        CMessage msgout (netbase.getSIDA (), "ERR");
+        msgout.serial (message);
+        netbase.send (msgout, from);
+}
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("client %s is connected", from->asString().c_str());
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).ServiceAlias, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        //
+        // send service alias list
+        //
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteScript (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string script;
+        msgin.serial (script);
+        initScript (script);
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                errorMessage ("couldn't execute command, as didn't find the aes", from, netbase);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceName;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceName);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                errorMessage ("couldn't start service, as didn't find the aes", from, netbase);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceName);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                errorMessage ("couldn't stop service, as didn't find the service", from, netbase);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                errorMessage ("couldn't stop service, as didn't find the aes", from, netbase);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                errorMessage ("couldn't stop service, as didn't find the service", from, netbase);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "SYS", cbExecuteSystemCommand },
+        { "EXEC", cbExecuteScript },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+                DebugLog->addNegativeFilter ("L0:");
+                DebugLog->addNegativeFilter ("L1:");
+                DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                for (sint i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.ServiceAlias = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+        }
+
+        bool                update ()
+        {
+                return true;
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.9&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.9&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..57683381 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?rev=1.9&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,948 @@ + + + +code/nelns/admin_service/admin_service.cpp - view - 1.9 + +
[BACK] Return to admin_service.cpp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.cpp (download)
+Revision 1.9, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN +
Changes since 1.8: +14 -4 + lines
+ADDED: command redirection
+
+

/** \file admin_service.cpp
+ * Admin Service (AS)
+ *
+ * $Id: admin_service.cpp,v 1.9 2001/06/27 08:34:23 lecroart Exp $
+ *
+ */
+
+/* Copyright, 2000 Nevrax Ltd.
+ *
+ * This file is part of NEVRAX NeL Network Services.
+ * NEVRAX NeL Network Services is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * NEVRAX NeL Network Services is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with NEVRAX NeL Network Services; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <string>
+#include <list>
+
+#include "nel/net/service.h"
+#include "nel/misc/debug.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/command.h"
+
+#include "nel/net/net_manager.h"
+
+using namespace std;
+using namespace NLMISC;
+using namespace NLNET;
+
+////////////////////////
+
+
+struct CService
+{
+        CService () : Id(0xFFFFFFFF), Ready(false), Connected(false), InConfig(false) { }
+
+        uint32                        Id;                                /// uint32 to identify the service
+        string                        AliasName;                /// alias of the service used in the AES and AS to find him (unique per AES)
+        string                        ShortName;                /// name of the service in short format ("NS" for example)
+        string                        LongName;                /// name of the service in long format ("naming_service")
+        bool                        Ready;                        /// true if the service is ready
+        bool                        Connected;                /// true if the service is connected to the AES
+        bool                        InConfig;                /// true if the service is in the configuration
+        std::vector<NLMISC::CSerialCommand>        Commands;
+
+        void setValues (const CService &t)
+        {
+                // copy all except gtk stuffs
+                Id = t.Id;
+                AliasName = t.AliasName;
+                ShortName = t.ShortName;
+                LongName = t.LongName;
+                Ready = t.Ready;
+                Connected = t.Connected;
+                //InConfig = t.InConfig; never change the inconfig value
+        }
+};
+
+typedef list<CService> TServices;
+typedef list<CService>::iterator SIT;
+
+struct CAdminExecutorService
+{
+        CAdminExecutorService () : Id(NextId++), SockId(NULL), Connected(false) { }
+
+        TSockId        SockId;                        /// connection to the AES
+        uint32        Id;                                /// uint32 to identify the AES where the service is running
+
+        string        ServerAlias;        /// name of the layer4 connection, used to send message to this AES
+        string        ServerAddr;                /// address in a string format (only the ip)
+        bool        Connected;                /// true if the AES is connected
+
+        TServices Services;
+
+        vector<string>        ServiceAliasList;
+
+        SIT findService (uint32 sid, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).Id == sid)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+        SIT findService (const string &alias, bool asrt = true)
+        {
+                SIT sit;
+                for (sit = Services.begin(); sit != Services.end(); sit++)
+                        if ((*sit).AliasName == alias)
+                                break;
+
+                if (asrt)
+                        nlassert (sit != Services.end());
+                return sit;
+        }
+
+private:
+        static uint32 NextId;
+};
+
+uint32 CAdminExecutorService::NextId = 1;
+
+typedef list<CAdminExecutorService> TAdminExecutorServices;
+typedef list<CAdminExecutorService>::iterator AESIT;
+
+TAdminExecutorServices AdminExecutorServices;
+
+/////////////////
+
+AESIT findAdminExecutorService (uint32 aesid, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).Id == aesid)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+AESIT findAdminExecutorService (string ServerAlias, bool asrt = true)
+{
+        AESIT aesit;
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+                if ((*aesit).ServerAlias == ServerAlias)
+                        break;
+
+        if (asrt)
+                nlassert (aesit != AdminExecutorServices.end());
+        return aesit;
+}
+
+void displayServices ()
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                nlinfo ("> Admin");
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        nlinfo ("  > '%s' '%s' '%s' '%s' %d %d", (*aesit).SockId->asString().c_str(), (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str(), (*aesit).Id, (*sit).Id);
+                }
+        }
+}
+
+
+// send a message to a client. if ok is 0 it s an error or it s a normal 
+void messageToClient (uint8 ok, string msg, TSockId from = NULL)
+{
+        CMessage msgout (CNetManager::getSIDA ("AS"), "MESSAGE");
+        msgout.serial (ok, msg);
+        CNetManager::send ("AS", msgout, from);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////////// SCRIPT MANAGER /////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool StartAllServices = false;
+uint32 StartAllServicesPos;
+
+void doNextStartAllServicesStep ()
+{
+        nlassert (StartAllServices);
+
+        // get the script
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                // check the position
+
+                if (StartAllServicesPos*2 >= (uint32)script.size())
+                {
+                        StartAllServices = false;
+
+                        nlinfo("end of the script");
+                        messageToClient (1, "Start All Service finnished correctly");
+                        return;
+                }
+
+                // get the script line
+
+                string serverAlias;
+                string serviceAlias;
+
+                try
+                {
+                        serverAlias = script.asString (StartAllServicesPos*2);
+                        serviceAlias = script.asString (StartAllServicesPos*2+1);
+                }
+                catch(EBadSize &)
+                {
+                        messageToClient (1, "'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        nlwarning ("'Services' variable does not contains a good number of entries (must be a multiple of 2)");
+                        StartAllServices = false;
+                        return;
+                }
+
+                AESIT aesit = findAdminExecutorService (serverAlias, false);
+                if (aesit == AdminExecutorServices.end())
+                {
+                        messageToClient (1, "don't find the server");
+                        nlwarning("don't find the server");
+                        StartAllServices = false;
+                        return;
+                }
+
+                // check if the service is not currently running
+
+                StartAllServicesPos++;
+
+                SIT sit = (*aesit).findService (serviceAlias);
+                if ((*sit).Connected)
+                {
+                        // the service is already running, go to the next process
+                        doNextStartAllServicesStep ();
+                }
+                else
+                {
+                        // send the resquest to the AES
+
+                        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+                        msgout.serial (serviceAlias);
+                        CNetManager::send ((*aesit).ServerAlias, msgout);
+                }
+        }
+        catch(EUnknownVar&)
+        {
+                messageToClient (1, "'Services' variable is not found");
+                nlwarning ("'Services' variable is not found");
+                StartAllServices = false;
+                return;
+        }
+}
+
+void initStartAllServices ()
+{
+        if (StartAllServices)
+        {
+                messageToClient (1, "already running a script, reset it");
+                nlwarning("already running a script, reset it");
+                StartAllServices = false;
+        }
+
+        try
+        {
+                CConfigFile::CVar &script = IService::ConfigFile.getVar("Services");
+
+                for (sint i = 0 ; i < script.size (); i+=2)
+                {
+                        string serverAlias = script.asString(i);
+                        AESIT aesit = findAdminExecutorService (serverAlias, false);
+                        if (aesit == AdminExecutorServices.end())
+                        {
+                                messageToClient (1, "an aes is not running, can't run the script");
+                                nlwarning("aes '%s' isn't running, can't run the script", serverAlias.c_str());
+                                return;
+                        }
+                }
+        }
+        catch(EConfigFile &)
+        {
+                messageToClient (1, "bad config file");
+                nlwarning ("bad config file");
+                return;
+        }
+
+        StartAllServicesPos = 0;
+        StartAllServices = true;
+
+        doNextStartAllServicesStep();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE AES ///////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+static void cbExecuteSystemCommandResult (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        vector<string> result;
+        msgin.serialCont (result);
+
+        nlinfo("command result");
+        for (uint i = 0; i < result.size(); i++)
+        {
+                printf ("%s", result[i].c_str());
+        }
+        nlinfo("end of command result");
+}
+
+// get the service list from the admin exec and send the list to all admin client
+static void cbServiceList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        //
+        // Get the list of service from aes
+        //
+
+        uint32 nbs;
+        msgin.serial (nbs);
+
+        for (uint32 i = 0; i < nbs; i++)
+        {
+                // find the service
+                CService s;
+
+                msgin.serial (s.Id, s.AliasName, s.ShortName, s.LongName, s.Ready);
+                msgin.serialCont (s.Commands);
+                s.Connected = true;
+
+                if (!s.AliasName.empty())
+                {
+                        SIT sit = aes->findService (s.AliasName, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with alias, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+                else
+                {
+                        SIT sit = aes->findService (s.Id, false);
+                        if (sit == aes->Services.end ())
+                        {
+                                aes->Services.push_back (s);
+                        }
+                        else
+                        {
+                                nlassert ("the service already exists with id, update it");
+                                (*sit).setValues (s);
+                        }
+                }
+        }
+        
+        displayServices ();
+
+        //
+        // Send the new list to all admin
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id);
+        uint32 ss = aes->Services.size();
+        msgout.serial (ss);
+
+        for (SIT sit = aes->Services.begin(); sit != aes->Services.end(); sit++)
+        {
+                msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                msgout.serialCont ((*sit).Commands);
+        }
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceAliasList (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // get the service list from the admin exec and send the list to all admin client
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->ServiceAliasList.clear ();
+        msgin.serialCont (aes->ServiceAliasList);
+
+        nlinfo("send SAL to admin callback from aes");
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SAL");
+        msgout.serial (aes->Id);
+        msgout.serialCont (aes->ServiceAliasList);
+        CNetManager::send ("AS", msgout, 0);
+        
+        nlinfo("new service alias list");
+}
+
+
+static void cbServiceIdentification (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        string alias;
+
+        msgin.serial (sid, alias);
+
+        SIT sit;
+        if (!alias.empty())
+        {
+                sit = aes->findService (alias, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // the alias is not found
+                        nlwarning ("new service with alias (%s) but not in my list", alias.c_str());
+
+                        aes->Services.push_back (CService ());
+                        sit = aes->Services.end();
+                        sit--;
+                }
+                else
+                {
+                        // normal case
+                }
+        }
+        else
+        {
+                sit = aes->findService (sid, false);
+
+                if (sit == aes->Services.end ())
+                {
+                        // normal case for unknown services
+                        nlwarning ("new service without alias and not in my list, add it");
+                }
+                else
+                {
+                        nlwarning ("new service without alias is already in my list with id %d, add it", sid);
+                }
+                aes->Services.push_back (CService ());
+                sit = aes->Services.end();
+                sit--;
+        }
+
+        (*sit).Id = sid;
+        (*sit).AliasName = alias;
+        (*sit).Connected = true;
+        msgin.serial ((*sit).ShortName, (*sit).LongName);
+        msgin.serialCont ((*sit).Commands);
+
+        nlinfo ("*:%d:%d is identified to be '%s' '%s' '%s'", aes->Id, sid, (*sit).AliasName.c_str(), (*sit).ShortName.c_str(), (*sit).LongName.c_str());
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SID");
+        msgout.serial (aes->Id, sid, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+        msgout.serialCont ((*sit).Commands);
+
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceReady (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        SIT sit = aes->findService(sid);
+        (*sit).Ready = true;
+
+        nlinfo ("*:%d:%d is ready", aes->Id, sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SR");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+
+        // if we are in a script execution, continue
+        if (StartAllServices)
+                doNextStartAllServicesStep();
+}
+
+static void cbServiceConnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d connected", aes->Id, sid);
+
+        // don't do anything. we have to wait identification to add it in out lists
+
+/*
+        aes->Services.push_back (CService(sid));
+*/
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SC");
+        msgout.serial (aes->Id, sid);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbServiceDisconnection (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        uint32 sid;
+        msgin.serial (sid);
+
+        nlinfo ("*:%d:%d disconnected", aes->Id, sid);
+
+        SIT sit = aes->findService(sid);
+
+        // broadcast the message to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SD");
+        msgout.serial (aes->Id, (*sit).Id);
+        CNetManager::send ("AS", msgout, 0);
+
+        if ((*sit).InConfig)
+        {
+                (*sit).Ready = (*sit).Connected = false;
+                (*sit).Id = 0xFFFFFFFF;
+                (*sit).ShortName = (*sit).LongName = "";
+                (*sit).Commands.clear ();
+        }
+        else
+        {
+                // erase only if it's not a service in the config
+                aes->Services.erase (sit);
+        }
+
+        displayServices ();
+}
+
+// i'm connected to a new admin executor service
+void cbAESConnection (const string &serviceName, TSockId from, void *arg)
+{
+        AESIT aesit = findAdminExecutorService (serviceName);        
+        CAdminExecutorService *aes = &(*aesit);
+        
+        // set the appid to find the aes in O(1)
+        from->setAppId ((uint64)(uint)aes);
+
+        aes->Connected = true;
+        nlinfo ("*:%d:* connected", aes->Id);
+/*
+        // broadcast the message that an admin exec is connected to all admin client
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESC");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+// i'm disconnected to an admin executor service
+void cbAESDisconnection (const string &serviceName, TSockId from, void *arg)
+{
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        aes->Connected = false;
+
+        SIT sit;
+        for (sit = aes->Services.begin(); sit != aes->Services.end();)
+        {
+                // keep only inconfig services
+                if ((*sit).InConfig)
+                {
+                        (*sit).Id = 0xFFFFFFFF;
+                        (*sit).ShortName = (*sit).LongName = "";
+                        (*sit).Ready = (*sit).Connected = false;
+                        sit++;
+                }
+                else
+                {
+                        // erase only if it's not a service in the config
+                        sit = aes->Services.erase (sit);
+                }
+        }
+
+        nlinfo ("*:%d:* disconnected", aes->Id);
+/*      
+        // broadcast the message to all admin client that an admin exec is disconnected
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AESD");
+        msgout.serial (aes->Id);
+        CNetManager::send ("AS", msgout, 0);
+*/
+
+        displayServices ();
+
+        // broadcast the new state of this AES
+        CMessage msgout (CNetManager::getSIDA ("AS"), "AES_LIST");
+        uint32 nbaes = 1;
+        msgout.serial (nbaes);
+        msgout.serial (aes->Id, aes->ServerAlias, aes->ServerAddr, aes->Connected);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+static void cbLog (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        // received an answer for a command, give it to all admin client
+
+        // get the aes with the appid
+        CAdminExecutorService *aes = (CAdminExecutorService*) (uint) from->appId();
+
+        // broadcast the message to the admin service
+        CMessage msgout (CNetManager::getSIDA ("AS"), "XLOG");
+        string log;
+        uint32 sid;
+        msgin.serial (sid);
+        msgin.serial (log);
+
+        msgout.serial (aes->Id);
+        msgout.serial (sid);
+        msgout.serial (log);
+        CNetManager::send ("AS", msgout, 0);
+}
+
+
+TCallbackItem AESCallbackArray[] =
+{
+        { "ESCR", cbExecuteSystemCommandResult },
+
+        { "SL", cbServiceList },
+        { "SID", cbServiceIdentification },
+        { "SR", cbServiceReady },
+        { "SC", cbServiceConnection },
+        { "SD", cbServiceDisconnection },
+
+        { "SAL", cbServiceAliasList },
+
+        { "XLOG", cbLog },
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// CONNECTION TO THE CLIENT ////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+//
+// A new admin client is connected.
+//
+void clientConnection (const string &serviceName, TSockId from, void *arg)
+{
+        // new client, send him all out info about services
+
+        nlinfo ("client %s is connected", from->asString().c_str());
+
+        //
+        // send the list of all the aes
+        //
+
+        CMessage msgout2 (CNetManager::getSIDA ("AS"), "AES_LIST");
+        AESIT aesit;
+        uint32 nbaes = (uint32)AdminExecutorServices.size();
+        msgout2.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                // send info about the AES
+
+                msgout2.serial ((*aesit).Id, (*aesit).ServerAlias, (*aesit).ServerAddr, (*aesit).Connected);
+        }
+        CNetManager::send ("AS", msgout2, from);
+
+        //
+        // send the list of all services
+        //
+
+        CMessage msgout (CNetManager::getSIDA ("AS"), "SERVICE_LIST");
+        nbaes = (uint32)AdminExecutorServices.size();
+        msgout.serial (nbaes);
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                msgout.serial ((*aesit).Id);
+
+                uint32 nbs = (uint32)(*aesit).Services.size();
+                msgout.serial (nbs);
+
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        // send info about services of the AES
+                        
+                        msgout.serial ((*sit).Id, (*sit).AliasName, (*sit).ShortName, (*sit).LongName);
+                        msgout.serial ((*sit).Ready, (*sit).Connected, (*sit).InConfig);
+                        msgout.serialCont ((*sit).Commands);
+                }
+        }
+        CNetManager::send ("AS", msgout, from);
+
+        displayServices ();
+
+        //
+        // send service alias list
+        //
+
+        nlinfo("send SAL to admin startup");
+
+        for (aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                CMessage msgout2 (CNetManager::getSIDA ("AS"), "SAL");
+                msgout2.serial ((*aesit).Id);
+                msgout2.serialCont ((*aesit).ServiceAliasList);
+                CNetManager::send ("AS", msgout2, from);
+        }
+}
+
+
+static void cbExecuteSystemCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string command;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't execute command, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "SYS");
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+
+static void cbStartService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        string serviceAlias;
+        uint32 aesid;
+        msgin.serial (aesid);
+        msgin.serial (serviceAlias);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                // don't find the aes, send an error message
+                messageToClient (0, "couldn't start service, as didn't find the aes", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STARTS");
+        msgout.serial (serviceAlias);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStopService (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+        msgout.serial (sid);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbExecCommand (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        uint32 aesid, sid;
+        string command;
+        msgin.serial (aesid);
+        msgin.serial (sid);
+        msgin.serial (command);
+
+        AESIT aesit = findAdminExecutorService (aesid, false);
+        if (aesit == AdminExecutorServices.end())
+        {
+                messageToClient (0, "couldn't stop service, as didn't find the aes", from);
+                // don't find the aes, send an error message
+                return;
+        }
+
+        SIT sit = (*aesit).findService (sid, false);
+        if (sit == (*aesit).Services.end())
+        {
+                // don't find the s, send an error message
+                messageToClient (0, "couldn't stop service, as didn't find the service", from);
+                return;
+        }
+
+        // send the resquest to the AES
+
+        CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "EXEC_COMMAND");
+        msgout.serial (sid);
+        msgout.serial (command);
+        CNetManager::send ((*aesit).ServerAlias, msgout);
+}
+
+static void cbStartAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        initStartAllServices ();
+}
+
+static void cbStopAllServices (CMessage& msgin, TSockId from, CCallbackNetBase &netbase)
+{
+        for (AESIT aesit = AdminExecutorServices.begin(); aesit != AdminExecutorServices.end(); aesit++)
+        {
+                for (SIT sit = (*aesit).Services.begin(); sit != (*aesit).Services.end(); sit++)
+                {
+                        if ((*sit).Connected)
+                        {
+                                CMessage msgout (CNetManager::getSIDA((*aesit).ServerAlias), "STOPS");
+                                msgout.serial ((*sit).Id);
+                                CNetManager::send ((*aesit).ServerAlias, msgout);
+                        }
+                }
+        }
+}
+
+TCallbackItem ClientCallbackArray[] =
+{
+        { "SYS", cbExecuteSystemCommand },
+        { "STARTS", cbStartService },
+        { "STOPS", cbStopService },
+        { "EXEC_COMMAND", cbExecCommand },
+        { "START_ALL_SERVICES", cbStartAllServices },
+        { "STOP_ALL_SERVICES", cbStopAllServices },
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////// SERVICE IMPLEMENTATION //////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class CAdminService : public IService
+{
+public:
+
+        /// Init the service, load the universal time.
+        void                init ()
+        {
+//              DebugLog->addNegativeFilter ("L0:");
+//              DebugLog->addNegativeFilter ("L1:");
+//              DebugLog->addNegativeFilter ("L2:");
+                
+                
+                CNetManager::setConnectionCallback ("AS", clientConnection, NULL);
+
+                //
+                // Get the list of AESHosts, add in the structures and create connection to all AES
+                //
+
+                CConfigFile::CVar &host = ConfigFile.getVar ("AESHosts");
+                sint i;
+                for (i = 0 ; i < host.size (); i+=2)
+                {
+                        string serverAlias = host.asString(i);
+                        string serverAddr = host.asString(i+1);
+
+                        // add to the list
+                        CAdminExecutorService aes;
+                        aes.ServerAlias = serverAlias;
+                        aes.ServerAddr = serverAddr;
+                        AdminExecutorServices.push_back (aes);
+
+                        // connect to the AES
+                        CNetManager::setConnectionCallback (serverAlias, cbAESConnection, NULL);
+                        CNetManager::setDisconnectionCallback (serverAlias, cbAESDisconnection, NULL);
+                        CNetManager::addClient (serverAlias, serverAddr+":49996");
+                        CNetManager::addCallbackArray (serverAlias, AESCallbackArray, sizeof (AESCallbackArray)/sizeof(AESCallbackArray[0]));
+                }
+
+                //
+                // Get the list of services in the shard
+                //
+
+                CConfigFile::CVar &serv = ConfigFile.getVar ("Services");
+                for (i = 0 ; i < serv.size (); i+=2)
+                {
+                        string serverAlias = serv.asString(i);
+                        string serviceAlias = serv.asString(i+1);
+
+                        AESIT aesit = findAdminExecutorService (serverAlias);
+
+                        // add new AES in the list
+                        CService s;
+                        s.AliasName = serviceAlias;
+                        s.InConfig = true;
+                        (*aesit).Services.push_back (s);
+                }
+                displayServices ();
+        }
+
+        bool                update ()
+        {
+                return true;
+        }
+};
+
+
+// AS is a server connection to the admin client
+// AESAS is a client connection to the admin executor
+
+/// Naming Service
+NLNET_SERVICE_MAIN (CAdminService, "AS", "admin_service", 49995, ClientCallbackArray);
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=author b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=author new file mode 100644 index 00000000..480da305 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=author @@ -0,0 +1,277 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=date b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=date new file mode 100644 index 00000000..a6646142 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=date @@ -0,0 +1,277 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=log b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=log new file mode 100644 index 00000000..3a7c30a8 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=log @@ -0,0 +1,277 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=rev b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=rev new file mode 100644 index 00000000..a745e7e0 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.cpp?sortby=rev @@ -0,0 +1,277 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.cpp
+ + + + + +
admin_service.cpp
+

+

Default branch: MAIN
+


+ Revision 1.15 / (download) - annotate - [select for diffs] +, Mon Mar 25 09:28:00 2002 UTC (4 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.14: +8 -6 + lines
Diff to previous 1.14 +

+CHANGED: use new service functions
+
+

+ Revision 1.14 / (download) - annotate - [select for diffs] +, Tue Mar 19 17:42:48 2002 UTC (4 months ago) by valignat +
Branch: MAIN + +
Changes since 1.13: +14 -2 + lines
Diff to previous 1.13 +

+Applied patches which help to have a clen install on GNU/Linux and to make a Debian package (changes on the management of config and log files, bugfixes, etc ...)
+
+

+ Revision 1.13 / (download) - annotate - [select for diffs] +, Fri Mar 1 10:20:32 2002 UTC (4 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.12: +8 -16 + lines
Diff to previous 1.12 +

+ADDED: password per shard auth
+
+

+ Revision 1.12 / (download) - annotate - [select for diffs] +, Fri Feb 15 17:07:43 2002 UTC (5 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.11: +50 -2 + lines
Diff to previous 1.11 +

+ADDED: login password
+
+

+ Revision 1.11 / (download) - annotate - [select for diffs] +, Tue Jul 10 16:49:53 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.10: +18 -14 + lines
Diff to previous 1.10 +

+BUGFIX: when a service isn't ready and already disconnected, it doesn't crash anymore
+
+

+ Revision 1.10 / (download) - annotate - [select for diffs] +, Thu Jul 5 08:26:07 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.9: +1 -6 + lines
Diff to previous 1.9 +

+REMOVED: update()
+
+

+ Revision 1.9 / (download) - annotate - [select for diffs] +, Wed Jun 27 08:34:23 2001 UTC (12 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.8: +14 -4 + lines
Diff to previous 1.8 +

+ADDED: command redirection
+
+

+ Revision 1.8 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:54:06 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.7: +2 -2 + lines
Diff to previous 1.7 +

+BUGFIX: linux compilation
+
+

+ Revision 1.7 / (download) - annotate - [select for diffs] +, Mon Jun 18 14:43:31 2001 UTC (13 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.6: +10 -9 + lines
Diff to previous 1.6 +

+BUGFIX: linux compilation
+
+

+ Revision 1.6 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.5: +134 -48 + lines
Diff to previous 1.5 +

+ADDED: commands system
+
+

+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu May 31 16:44:54 2001 UTC (13 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.4: +156 -61 + lines
Diff to previous 1.4 +

+ADDED: service alias naming
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri May 18 16:51:33 2001 UTC (14 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +405 -101 + lines
Diff to previous 1.3 +

+ADDED: work in progress. added gtk
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Thu May 10 08:20:06 2001 UTC (14 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +233 -34 + lines
Diff to previous 1.2 +

+ADDED: changed the data structures
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu May 3 13:19:13 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +2 -6 + lines
Diff to previous 1.1 +

+BUGFIX: now compile on linux
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp new file mode 100644 index 00000000..59e4b429 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp @@ -0,0 +1,174 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu Aug 23 15:43:21 2001 UTC (9 months, 4 weeks ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri Jun 15 09:58:49 2001 UTC (12 months ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Tue Jun 12 15:44:38 2001 UTC (12 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (12 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.1&r2=1.2 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.1&r2=1.2 new file mode 100644 index 00000000..79837f31 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.1&r2=1.2 @@ -0,0 +1,32 @@ + + + +code/nelns/admin_service/admin_service.dsp - diff - 1.2 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.dsp between version 1.1 and 1.2

+ + + + + + + + + + + + + + + +
version 1.1, 2001/05/02 12:36:39version 1.2, 2001/06/07 16:19:05
Line 111 
Line 111 
 # Name "admin_service - Win32 ReleaseDebug" # Name "admin_service - Win32 ReleaseDebug"
 # Begin Source File # Begin Source File
  
  SOURCE=.\admin_service.cfg
  # End Source File
  # Begin Source File
  
 SOURCE=.\admin_service.cpp SOURCE=.\admin_service.cpp
 # End Source File # End Source File
 # End Target # End Target


+
Legend:
+
Removed from v.1.1 
changed lines
 Added in v.1.2
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.2&r2=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.2&r2=1.3 new file mode 100644 index 00000000..37be214b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp.diff?r1=1.2&r2=1.3 @@ -0,0 +1,48 @@ + + + +code/nelns/admin_service/admin_service.dsp - diff - 1.3 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Diff for /code/nelns/admin_service/admin_service.dsp between version 1.2 and 1.3

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
version 1.2, 2001/06/07 16:19:05version 1.3, 2001/06/12 15:44:38
Line 43 
Line 43 
 # PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir "" # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
 # ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
  # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD BASE RSC /l 0x40c /d "NDEBUG"
 # ADD RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x40c /d "NDEBUG"
 BSC32=bscmake.exe BSC32=bscmake.exe
Line 67 
Line 68 
 # PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir "" # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
 # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STL_DEBUG" /FR /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STL_DEBUG" /FR /FD /GZ /c
  # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD BASE RSC /l 0x40c /d "_DEBUG"
 # ADD RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG"
 BSC32=bscmake.exe BSC32=bscmake.exe
Line 92 
Line 94 
 # PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir "" # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
 # ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
  # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD BASE RSC /l 0x40c /d "NDEBUG"
 # ADD RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x40c /d "NDEBUG"
 BSC32=bscmake.exe BSC32=bscmake.exe


+
Legend:
+
Removed from v.1.2 
changed lines
 Added in v.1.3
+
+ + + +
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.1 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.1 new file mode 100644 index 00000000..142f7307 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.1 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.dsp - annotate - 1.1 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.dsp, Revision 1.1

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.3 new file mode 100644 index 00000000..1568ce69 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.3 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.dsp - annotate - 1.3 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.dsp, Revision 1.3

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.4 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.4 new file mode 100644 index 00000000..b37534e0 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?annotate=1.4 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/admin_service.dsp - annotate - 1.4 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/admin_service.dsp, Revision 1.4

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.3 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.3 new file mode 100644 index 00000000..04daf9e9 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.3 @@ -0,0 +1,176 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 + to selected 1.3 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri Jun 15 09:58:49 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [selected], Tue Jun 12 15:44:38 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 + to selected 1.3 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.3 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.4 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.4 new file mode 100644 index 00000000..70ef58a6 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.4 @@ -0,0 +1,176 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [selected], Fri Jun 15 09:58:49 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Tue Jun 12 15:44:38 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 + to selected 1.4 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 + to selected 1.4 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.4 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5 b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5 new file mode 100644 index 00000000..fa1db976 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5 @@ -0,0 +1,177 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [selected], Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri Jun 15 09:58:49 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 + to selected 1.5 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Tue Jun 12 15:44:38 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 + to selected 1.5 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 + to selected 1.5 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff to selected 1.5 +

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5&only_with_tag=HEAD b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5&only_with_tag=HEAD new file mode 100644 index 00000000..7d8fb83a --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?r1=1.5&only_with_tag=HEAD @@ -0,0 +1,137 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+Current tag: HEAD
+


+ Revision 1.5 / (download) - annotate - [selected], Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.2&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.2&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..68bb8627 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.2&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,135 @@ + + + +code/nelns/admin_service/admin_service.dsp - view - 1.2 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.dsp (download)
+Revision 1.2, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN +
Changes since 1.1: +4 -0 + lines
+ADDED: commands system
+
+

# Microsoft Developer Studio Project File - Name="admin_service" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=admin_service - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "admin_service.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "admin_service.mak" CFG="admin_service - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "admin_service - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "admin_service - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "admin_service - Win32 ReleaseDebug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "admin_service - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF  "$(CFG)" == "admin_service - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STL_DEBUG" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /nodefaultlib:"libcd.lib" /pdbtype:sept
+
+!ELSEIF  "$(CFG)" == "admin_service - Win32 ReleaseDebug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseDebug"
+# PROP BASE Intermediate_Dir "ReleaseDebug"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseDebug"
+# PROP Intermediate_Dir "ReleaseDebug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+
+!ENDIF 
+
+# Begin Target
+
+# Name "admin_service - Win32 Release"
+# Name "admin_service - Win32 Debug"
+# Name "admin_service - Win32 ReleaseDebug"
+# Begin Source File
+
+SOURCE=.\admin_service.cfg
+# End Source File
+# Begin Source File
+
+SOURCE=.\admin_service.cpp
+# End Source File
+# End Target
+# End Project
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.5&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.5&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..74b134ad --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?rev=1.5&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,172 @@ + + + +code/nelns/admin_service/admin_service.dsp - view - 1.5 + +
[BACK] Return to admin_service.dsp + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.dsp (download)
+Revision 1.5, Thu Aug 23 15:43:21 2001 UTC (9 months, 4 weeks ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
Changes since 1.4: +34 -3 + lines
+ADDED: DebugFast config
+
+

# Microsoft Developer Studio Project File - Name="admin_service" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=admin_service - Win32 DebugFast
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "admin_service.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "admin_service.mak" CFG="admin_service - Win32 DebugFast"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "admin_service - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "admin_service - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "admin_service - Win32 ReleaseDebug" (based on "Win32 (x86) Console Application")
+!MESSAGE "admin_service - Win32 DebugFast" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "admin_service - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "admin_service - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /Gi /GR /GX /Zi /Od /Gf /D "_DEBUG" /D "__STL_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /nodefaultlib:"libcd.lib" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "admin_service - Win32 ReleaseDebug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "ReleaseDebug"
+# PROP BASE Intermediate_Dir "ReleaseDebug"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "ReleaseDebug"
+# PROP Intermediate_Dir "ReleaseDebug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "admin_service - Win32 DebugFast"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "admin_service___Win32_DebugFast"
+# PROP BASE Intermediate_Dir "admin_service___Win32_DebugFast"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "DebugFast"
+# PROP Intermediate_Dir "DebugFast"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /Gi /GR /GX /Zi /Od /Gf /D "_DEBUG" /D "__STL_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /FR /FD /GZ /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /MDd /W3 /Gm /Gi /GR /GX /Zi /Od /Ob1 /Gf /D "_WINDOWS" /D "_DEBUG" /D "WIN32" /D "_MBCS" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /nodefaultlib:"libcd.lib" /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /nodefaultlib:"libcd.lib" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF 
+
+# Begin Target
+
+# Name "admin_service - Win32 Release"
+# Name "admin_service - Win32 Debug"
+# Name "admin_service - Win32 ReleaseDebug"
+# Name "admin_service - Win32 DebugFast"
+# Begin Source File
+
+SOURCE=.\admin_service.cfg
+# End Source File
+# Begin Source File
+
+SOURCE=.\admin_service.cpp
+# End Source File
+# End Target
+# End Project
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=date b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=date new file mode 100644 index 00000000..f3c439d2 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=date @@ -0,0 +1,177 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri Jun 15 09:58:49 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Tue Jun 12 15:44:38 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=log b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=log new file mode 100644 index 00000000..57852a9c --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=log @@ -0,0 +1,177 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri Jun 15 09:58:49 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Tue Jun 12 15:44:38 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=rev b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=rev new file mode 100644 index 00000000..fb67a76d --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.dsp?sortby=rev @@ -0,0 +1,177 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.dsp
+ + + + + +
admin_service.dsp
+

+

Default branch: MAIN
+


+ Revision 1.5 / (download) - annotate - [select for diffs] +, Thu Aug 23 15:43:21 2001 UTC (11 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Changes since 1.4: +34 -3 + lines
Diff to previous 1.4 +

+ADDED: DebugFast config
+
+

+ Revision 1.4 / (download) - annotate - [select for diffs] +, Fri Jun 15 09:58:49 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.3: +9 -6 + lines
Diff to previous 1.3 +

+CHANGED: use win32
+
+

+ Revision 1.3 / (download) - annotate - [select for diffs] +, Tue Jun 12 15:44:38 2001 UTC (13 months, 1 week ago) by lecroart +
Branch: MAIN + +
Changes since 1.2: +6 -3 + lines
Diff to previous 1.2 +

+#CHANGED: remove precompilated header
+
+

+ Revision 1.2 / (download) - annotate - [select for diffs] +, Thu Jun 7 16:19:05 2001 UTC (13 months, 2 weeks ago) by lecroart +
Branch: MAIN + +
Changes since 1.1: +4 -0 + lines
Diff to previous 1.1 +

+ADDED: commands system
+
+

+ Revision 1.1 / (download) - annotate - [select for diffs] +, Wed May 2 12:36:39 2001 UTC (14 months, 3 weeks ago) by lecroart +
Branch: MAIN + +
Diff

+ADD: new version of the network system (in NeL and NeLns)
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj new file mode 100644 index 00000000..cdc79f05 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj @@ -0,0 +1,134 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.vcproj
+ + + + + +
admin_service.vcproj
+

+

Default branch: MAIN
+


+ Revision 1.1 / (download) - annotate - [select for diffs] +, Tue Apr 16 12:51:31 2002 UTC (2 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Diff

+ADDED: visual .net project
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html new file mode 100644 index 00000000..af2606e2 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html @@ -0,0 +1,269 @@ + + + +code/nelns/admin_service/admin_service.vcproj - view - 1.1 + +
[BACK] Return to admin_service.vcproj + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.vcproj (download)
+Revision 1.1, Tue Apr 16 12:51:31 2002 UTC (3 months, 1 week ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: visual .net project
+
+

<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+        ProjectType="Visual C++"
+        Version="7.00"
+        Name="admin_service"
+        SccProjectName=""
+        SccLocalPath="">
+        <Platforms>
+                <Platform
+                        Name="Win32"/>
+        </Platforms>
+        <Configurations>
+                <Configuration
+                        Name="DebugFast|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                Optimization="0"
+                                InlineFunctionExpansion="1"
+                                PreprocessorDefinitions="_WINDOWS,_DEBUG,WIN32"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                BasicRuntimeChecks="3"
+                                SmallerTypeCheck="TRUE"
+                                RuntimeLibrary="3"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                BrowseInformationFile="$(IntDir)"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"
+                                DebugInformationFormat="3"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                IgnoreDefaultLibraryNames="libcmtd.lib,libcd.lib"
+                                GenerateDebugInformation="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="_DEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+                <Configuration
+                        Name="Debug|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                Optimization="0"
+                                PreprocessorDefinitions="_DEBUG,__STL_DEBUG,WIN32,_WINDOWS"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                BasicRuntimeChecks="3"
+                                SmallerTypeCheck="TRUE"
+                                RuntimeLibrary="3"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                BrowseInformationFile="$(IntDir)"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"
+                                DebugInformationFormat="3"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                IgnoreDefaultLibraryNames="libcmtd.lib,libcd.lib"
+                                GenerateDebugInformation="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="_DEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+                <Configuration
+                        Name="Release|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                InlineFunctionExpansion="1"
+                                PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                SmallerTypeCheck="FALSE"
+                                RuntimeLibrary="2"
+                                EnableFunctionLevelLinking="TRUE"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="NDEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+                <Configuration
+                        Name="ReleaseDebug|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                InlineFunctionExpansion="1"
+                                PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                BasicRuntimeChecks="3"
+                                SmallerTypeCheck="TRUE"
+                                RuntimeLibrary="2"
+                                EnableFunctionLevelLinking="TRUE"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"
+                                DebugInformationFormat="3"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                GenerateDebugInformation="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="NDEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+        </Configurations>
+        <Files>
+                <File
+                        RelativePath=".\admin_service.cfg">
+                </File>
+                <File
+                        RelativePath=".\admin_service.cpp">
+                </File>
+        </Files>
+        <Globals>
+        </Globals>
+</VisualStudioProject>
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup/index.html new file mode 100644 index 00000000..e3868fbe --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?rev=1.1&content-type=text/x-cvsweb-markup/index.html @@ -0,0 +1,269 @@ + + + +code/nelns/admin_service/admin_service.vcproj - view - 1.1 + +
[BACK] Return to admin_service.vcproj + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / admin_service.vcproj (download)
+Revision 1.1, Tue Apr 16 12:51:31 2002 UTC (2 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: visual .net project
+
+

<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+        ProjectType="Visual C++"
+        Version="7.00"
+        Name="admin_service"
+        SccProjectName=""
+        SccLocalPath="">
+        <Platforms>
+                <Platform
+                        Name="Win32"/>
+        </Platforms>
+        <Configurations>
+                <Configuration
+                        Name="DebugFast|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                Optimization="0"
+                                InlineFunctionExpansion="1"
+                                PreprocessorDefinitions="_WINDOWS,_DEBUG,WIN32"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                BasicRuntimeChecks="3"
+                                SmallerTypeCheck="TRUE"
+                                RuntimeLibrary="3"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                BrowseInformationFile="$(IntDir)"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"
+                                DebugInformationFormat="3"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                IgnoreDefaultLibraryNames="libcmtd.lib,libcd.lib"
+                                GenerateDebugInformation="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="_DEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+                <Configuration
+                        Name="Debug|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                Optimization="0"
+                                PreprocessorDefinitions="_DEBUG,__STL_DEBUG,WIN32,_WINDOWS"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                BasicRuntimeChecks="3"
+                                SmallerTypeCheck="TRUE"
+                                RuntimeLibrary="3"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                BrowseInformationFile="$(IntDir)"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"
+                                DebugInformationFormat="3"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                IgnoreDefaultLibraryNames="libcmtd.lib,libcd.lib"
+                                GenerateDebugInformation="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="_DEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+                <Configuration
+                        Name="Release|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                InlineFunctionExpansion="1"
+                                PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                SmallerTypeCheck="FALSE"
+                                RuntimeLibrary="2"
+                                EnableFunctionLevelLinking="TRUE"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="NDEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+                <Configuration
+                        Name="ReleaseDebug|Win32"
+                        OutputDirectory="$(ConfigurationName)7\"
+                        IntermediateDirectory="$(ConfigurationName)7\"
+                        ConfigurationType="1"
+                        UseOfMFC="0"
+                        ATLMinimizesCRunTimeLibraryUsage="FALSE"
+                        CharacterSet="2">
+                        <Tool
+                                Name="VCCLCompilerTool"
+                                InlineFunctionExpansion="1"
+                                PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS"
+                                StringPooling="TRUE"
+                                MinimalRebuild="TRUE"
+                                BasicRuntimeChecks="3"
+                                SmallerTypeCheck="TRUE"
+                                RuntimeLibrary="2"
+                                EnableFunctionLevelLinking="TRUE"
+                                RuntimeTypeInfo="TRUE"
+                                UsePrecompiledHeader="2"
+                                PrecompiledHeaderFile="$(IntDir)$(TargetName).pch"
+                                AssemblerListingLocation="$(IntDir)"
+                                ObjectFile="$(IntDir)"
+                                ProgramDataBaseFileName="$(IntDir)"
+                                BrowseInformation="0"
+                                WarningLevel="3"
+                                SuppressStartupBanner="TRUE"
+                                DebugInformationFormat="3"/>
+                        <Tool
+                                Name="VCCustomBuildTool"/>
+                        <Tool
+                                Name="VCLinkerTool"
+                                AdditionalOptions="/MACHINE:I386"
+                                AdditionalDependencies="odbc32.lib odbccp32.lib"
+                                OutputFile="$(OutDir)$(InputName).exe"
+                                LinkIncremental="2"
+                                SuppressStartupBanner="TRUE"
+                                GenerateDebugInformation="TRUE"
+                                ProgramDatabaseFile="$(IntDir)$(TargetName).pdb"
+                                SubSystem="2"/>
+                        <Tool
+                                Name="VCMIDLTool"
+                                TypeLibraryName="$(IntDir)$(TargetName).tlb"/>
+                        <Tool
+                                Name="VCPostBuildEventTool"/>
+                        <Tool
+                                Name="VCPreBuildEventTool"/>
+                        <Tool
+                                Name="VCPreLinkEventTool"/>
+                        <Tool
+                                Name="VCResourceCompilerTool"
+                                PreprocessorDefinitions="NDEBUG"
+                                Culture="1036"/>
+                        <Tool
+                                Name="VCWebServiceProxyGeneratorTool"/>
+                        <Tool
+                                Name="VCWebDeploymentTool"/>
+                </Configuration>
+        </Configurations>
+        <Files>
+                <File
+                        RelativePath=".\admin_service.cfg">
+                </File>
+                <File
+                        RelativePath=".\admin_service.cpp">
+                </File>
+        </Files>
+        <Globals>
+        </Globals>
+</VisualStudioProject>
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?sortby=author b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?sortby=author new file mode 100644 index 00000000..1fe523cd --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/admin_service.vcproj?sortby=author @@ -0,0 +1,137 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / admin_service.vcproj
+ + + + + +
admin_service.vcproj
+

+

Default branch: MAIN
+


+ Revision 1.1 / (download) - annotate - [select for diffs] +, Tue Apr 16 12:51:31 2002 UTC (3 months, 1 week ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Diff

+ADDED: visual .net project
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg new file mode 100644 index 00000000..bee18af0 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg @@ -0,0 +1,134 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / common.cfg
+ + + + + +
common.cfg
+

+

Default branch: MAIN
+


+ Revision 1.1 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (8 weeks, 3 days ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Diff

+ADDED: common.cfg
+
+ + + + + +
Request Diffs
+

+

+

+Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+View only Branch: + + +
+ +
+Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?annotate=1.1 b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?annotate=1.1 new file mode 100644 index 00000000..55684a06 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?annotate=1.1 @@ -0,0 +1,76 @@ + + + +code/nelns/admin_service/common.cfg - annotate - 1.1 + +
[BACK] Return to common.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

Annotation of code/nelns/admin_service/common.cfg, Revision 1.1

+
Status: 500 Internal Error
+Content-type: text/html
+
+
+
+
+	nevrax.org : cvs
+		
+
+	
+
+
+
+
+
+ 
+        
+        
+        
+        
+        
+ 
+
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+Error: Error occured during annotate: error + + + +
                                                                                                                                                                    +
+ + \ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?content-type=text/x-cvsweb-markup&rev=1.1 b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?content-type=text/x-cvsweb-markup&rev=1.1 new file mode 100644 index 00000000..b36070fa --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?content-type=text/x-cvsweb-markup&rev=1.1 @@ -0,0 +1,19 @@ + + + +code/nelns/admin_service/common.cfg - view - 1.1 + +
[BACK] Return to common.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / common.cfg (download)
+Revision 1.1, Tue Apr 23 15:54:07 2002 UTC (8 weeks, 3 days ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: common.cfg
+
+

+// by default, use WIN displayer
+WindowStyle = "WIN";
+
+// by default, use localhost to find the naming service
+NSHost = "localhost";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=author/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=author/index.html new file mode 100644 index 00000000..77a3314d --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=author/index.html @@ -0,0 +1,19 @@ + + + +code/nelns/admin_service/common.cfg - view - 1.1 + +
[BACK] Return to common.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / common.cfg (download)
+Revision 1.1, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: common.cfg
+
+

+// by default, use WIN displayer
+WindowStyle = "WIN";
+
+// by default, use localhost to find the naming service
+NSHost = "localhost";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html new file mode 100644 index 00000000..b012e78a --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=date/index.html @@ -0,0 +1,19 @@ + + + +code/nelns/admin_service/common.cfg - view - 1.1 + +
[BACK] Return to common.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / common.cfg (download)
+Revision 1.1, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: common.cfg
+
+

+// by default, use WIN displayer
+WindowStyle = "WIN";
+
+// by default, use localhost to find the naming service
+NSHost = "localhost";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=log/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=log/index.html new file mode 100644 index 00000000..7fd02592 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=log/index.html @@ -0,0 +1,19 @@ + + + +code/nelns/admin_service/common.cfg - view - 1.1 + +
[BACK] Return to common.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / common.cfg (download)
+Revision 1.1, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: common.cfg
+
+

+// by default, use WIN displayer
+WindowStyle = "WIN";
+
+// by default, use localhost to find the naming service
+NSHost = "localhost";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=rev/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=rev/index.html new file mode 100644 index 00000000..0734830f --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?rev=1.1&content-type=text/x-cvsweb-markup&sortby=rev/index.html @@ -0,0 +1,19 @@ + + + +code/nelns/admin_service/common.cfg - view - 1.1 + +
[BACK] Return to common.cfg + CVS log [TXT][DIR] Up to Nevrax / code / nelns / admin_service

File: Nevrax / code / nelns / admin_service / common.cfg (download)
+Revision 1.1, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN +
CVS Tags: HEAD
+ADDED: common.cfg
+
+

+// by default, use WIN displayer
+WindowStyle = "WIN";
+
+// by default, use localhost to find the naming service
+NSHost = "localhost";
+
\ No newline at end of file diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=log b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=log new file mode 100644 index 00000000..5fcdbc2b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=log @@ -0,0 +1,137 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / common.cfg
+ + + + + +
common.cfg
+

+

Default branch: MAIN
+


+ Revision 1.1 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Diff

+ADDED: common.cfg
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=rev b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=rev new file mode 100644 index 00000000..65b22920 --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/common.cfg?sortby=rev @@ -0,0 +1,137 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + +
Nevrax / code / nelns / admin_service / common.cfg
+ + + + + +
common.cfg
+

+

Default branch: MAIN
+


+ Revision 1.1 / (download) - annotate - [select for diffs] +, Tue Apr 23 15:54:07 2002 UTC (3 months ago) by lecroart +
Branch: MAIN + +
CVS Tags: HEAD +
Diff

+ADDED: common.cfg
+
+ + + + + +
Request Diffs
+

+

+

+ +Diffs between + + + and + + +
Type of Diff should be a  +
+ + + + + +
Select branch
+

+

+ +

+ +View only Branch: + + +
+ +
+ +Sort log by: + + +
+ + +
                                                                                                                                                                    +
+ + diff --git a/cvs/cvsweb.cgi/code/nelns/admin_service/index.html b/cvs/cvsweb.cgi/code/nelns/admin_service/index.html new file mode 100644 index 00000000..9f21826b --- /dev/null +++ b/cvs/cvsweb.cgi/code/nelns/admin_service/index.html @@ -0,0 +1,106 @@ + + + + nevrax.org : cvs + + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#Free software
+
+ + +
+ + +
+cvs + +
+ + + +
Nevrax / code / nelns / admin_service
+ + + + + + + + + + +
FileRev.AgeAuthorLast log entry
[BACK] + Previous Directory +    
[TXT] + Makefile.am + 1.5  8 weeks lecroart  CHANGED: update makefile to manage log and cfg dir (thanks to loic dachary) +
[TXT] + admin_service.cfg + 1.6  6 weeks lecroart  ADDED: common.cfg +
[TXT] + admin_service.cpp + 1.15  2 months lecroart  CHANGED: use new service functions +
[TXT] + admin_service.dsp + 1.5  9 months lecroart  ADDED: DebugFast config +
[TXT] + admin_service.vcproj + 1.1  7 weeks lecroart  ADDED: visual .net project +
[TXT] + common.cfg + 1.1  6 weeks lecroart  ADDED: common.cfg +

+Show only files with tag: + + +
+ + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1