]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/configproto.cpp
Added a function to check user existance.
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / configproto.cpp
index 232c57d838f937ec260760a5647d2b7b57ef952c..7bc635ab55407bb3c171b82eeeabf849da8e508c 100644 (file)
@@ -37,6 +37,7 @@
 #include "stg/admins.h"
 #include "stg/tariffs.h"
 #include "stg/logger.h"
 #include "stg/admins.h"
 #include "stg/tariffs.h"
 #include "stg/logger.h"
+#include "stg/common.h"
 
 #include <unistd.h>
 
 
 #include <unistd.h>
 
@@ -49,7 +50,6 @@ CONFIGPROTO * cp = static_cast<CONFIGPROTO *>(data);
 
 if (cp->currParser)
     {
 
 if (cp->currParser)
     {
-    cp->currParser->SetAnswerList(&cp->answerList);
     cp->currParser->SetCurrAdmin(*cp->currAdmin);
     cp->currParser->ParseStart(data, el, attr);
     }
     cp->currParser->SetCurrAdmin(*cp->currAdmin);
     cp->currParser->ParseStart(data, el, attr);
     }
@@ -57,7 +57,6 @@ else
     {
     for (size_t i = 0; i < cp->dataParser.size(); i++)
         {
     {
     for (size_t i = 0; i < cp->dataParser.size(); i++)
         {
-        cp->dataParser[i]->SetAnswerList(&cp->answerList);
         cp->dataParser[i]->SetCurrAdmin(*cp->currAdmin);
         cp->dataParser[i]->Reset();
         if (cp->dataParser[i]->ParseStart(data, el, attr) == 0)
         cp->dataParser[i]->SetCurrAdmin(*cp->currAdmin);
         cp->dataParser[i]->Reset();
         if (cp->dataParser[i]->ParseStart(data, el, attr) == 0)
@@ -80,6 +79,7 @@ if (cp->currParser)
     {
     if (cp->currParser->ParseEnd(data, el) == 0)
         {
     {
     if (cp->currParser->ParseEnd(data, el) == 0)
         {
+        cp->dataAnswer = cp->currParser->GetAnswer();
         cp->currParser = NULL;
         }
     }
         cp->currParser = NULL;
         }
     }
@@ -89,6 +89,8 @@ else
         {
         if (cp->dataParser[i]->ParseEnd(data, el) == 0)
             {
         {
         if (cp->dataParser[i]->ParseEnd(data, el) == 0)
             {
+            cp->dataAnswer = cp->currParser->GetAnswer();
+            cp->currParser = NULL;
             break;
             }
         }
             break;
             }
         }