Subversion Repositories HomeAutomation

Rev

Rev 1741 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1741 Rev 2107
Line 94... Line 94...
94
    }
94
    }
95
    else
95
    else
96
    {
96
    {
97
        LOG.Info(output);
97
        LOG.Info(output);
98
    }
98
    }
-
 
99
}
-
 
100
 
-
 
101
void Manager::CallResult(std::string output)
-
 
102
{
-
 
103
  if (this->current_plugin_name_ != "")
-
 
104
  {
-
 
105
    for (unsigned int n = 0; n < this->plugins_.size(); n++)
-
 
106
    {
-
 
107
      if (this->plugins_[n]->GetName() == this->current_plugin_name_)
-
 
108
      {
-
 
109
        this->plugins_[n]->CallResult(this->current_request_id_, output);
-
 
110
        return;
-
 
111
      }
-
 
112
    }
-
 
113
  }
-
 
114
  else
-
 
115
  {
-
 
116
    LOG.Info(output);
-
 
117
  }
99
}
118
}
100
 
119
 
101
Value Manager::Export_Log(const v8::Arguments& args)
120
Value Manager::Export_Log(const v8::Arguments& args)
102
{
121
{
103
    v8::Locker lock;
122
    v8::Locker lock;
Line 330... Line 349...
330
        {
349
        {
331
            this->CallOutput(this->FormatException(try_catch));
350
            this->CallOutput(this->FormatException(try_catch));
332
        }
351
        }
333
        else
352
        else
334
        {
353
        {
335
            //v8::String::AsciiValue response(result->ToString());
354
            v8::String::AsciiValue response(result->ToString());
336
            //this->CallOutput(std::string(*response));
355
            this->CallResult(std::string(*response));
337
        }
356
        }
338
    }
357
    }
339
   
358
   
340
    this->current_plugin_name_ = "";
359
    this->current_plugin_name_ = "";
341
    this->current_request_id_ = 0;
360
    this->current_request_id_ = 0;