updated to the new pikotools api: SpaceParser::SetSpace(...) methods have been removed
This commit is contained in:
parent
8bb585d97d
commit
27720afaf2
|
@ -1136,7 +1136,6 @@ void App::ReadPostJson()
|
|||
const int buffer_len = sizeof(buffer) / sizeof(char) - 1;
|
||||
int read_len;
|
||||
|
||||
space_parser.SetSpace(cur.request->post_in);
|
||||
post_buffer.clear();
|
||||
post_buffer.reserve(1024 * 1024 * 5); // IMPROVEME add to config?
|
||||
|
||||
|
@ -1155,7 +1154,7 @@ void App::ReadPostJson()
|
|||
|
||||
if( !post_buffer.empty() )
|
||||
{
|
||||
pt::SpaceParser::Status status = space_parser.ParseJSON(post_buffer.c_str());
|
||||
pt::SpaceParser::Status status = space_parser.ParseJSON(post_buffer.c_str(), cur.request->post_in);
|
||||
post_buffer.clear();
|
||||
|
||||
if( status != pt::SpaceParser::ok )
|
||||
|
|
|
@ -66,10 +66,6 @@ void Config::ShowError()
|
|||
|
||||
switch( parser.status )
|
||||
{
|
||||
case pt::SpaceParser::no_space:
|
||||
log << log2 << "Config: space not set" << logend;
|
||||
break;
|
||||
|
||||
case pt::SpaceParser::ok:
|
||||
log << log2 << "Config: syntax ok" << logend;
|
||||
break;
|
||||
|
@ -106,9 +102,7 @@ bool Config::ReadConfig(bool errors_to_stdout_, bool stdout_is_closed)
|
|||
}
|
||||
|
||||
log << log2 << "Config: reading a config file" << logend;
|
||||
|
||||
parser.SetSpace(space);
|
||||
pt::SpaceParser::Status status = parser.ParseSpaceFile(config_file);
|
||||
pt::SpaceParser::Status status = parser.ParseSpaceFile(config_file, space);
|
||||
|
||||
if( status == pt::SpaceParser::ok )
|
||||
{
|
||||
|
|
|
@ -144,8 +144,7 @@ pt::Space space;
|
|||
pt::SpaceParser parser;
|
||||
pt::Date date;
|
||||
|
||||
parser.SetSpace(space);
|
||||
pt::SpaceParser::Status status = parser.ParseSpaceFile(file);
|
||||
pt::SpaceParser::Status status = parser.ParseSpaceFile(file, space);
|
||||
|
||||
if( status == pt::SpaceParser::ok )
|
||||
{
|
||||
|
|
|
@ -167,11 +167,8 @@ void TimeZones::ParseZones()
|
|||
// just space by space (not implemented in Space at the moment)
|
||||
bool TimeZones::ReadTimeZones(const wchar_t * path)
|
||||
{
|
||||
parser.SetSpace(temp_space);
|
||||
zone_tab.clear();
|
||||
temp_space.clear();
|
||||
|
||||
pt::SpaceParser::Status status = parser.ParseSpaceFile(path);
|
||||
pt::SpaceParser::Status status = parser.ParseSpaceFile(path, temp_space);
|
||||
|
||||
if( status == pt::SpaceParser::ok )
|
||||
{
|
||||
|
|
|
@ -259,10 +259,7 @@ bool DbBase::AssertValueSpace(PGresult * r, int row, int col, pt::Space & space)
|
|||
{
|
||||
const char * res = AssertValue(r, row, col);
|
||||
|
||||
conf_parser.SetSpace(space);
|
||||
space.clear();
|
||||
|
||||
pt::SpaceParser::Status status = conf_parser.ParseSpace(res);
|
||||
pt::SpaceParser::Status status = conf_parser.ParseSpace(res, space);
|
||||
|
||||
if( status != pt::SpaceParser::ok )
|
||||
{
|
||||
|
|
|
@ -70,10 +70,7 @@ return true;
|
|||
|
||||
bool Env::Parse(const std::wstring & env_str)
|
||||
{
|
||||
space.clear();
|
||||
conf_parser.SetSpace(space);
|
||||
|
||||
return (conf_parser.ParseSpace(env_str) == pt::SpaceParser::ok);
|
||||
return (conf_parser.ParseSpace(env_str, space) == pt::SpaceParser::ok);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -62,10 +62,7 @@ bool Meta::HasAccess()
|
|||
|
||||
bool Meta::Parse(const std::wstring & meta_str)
|
||||
{
|
||||
space.clear();
|
||||
conf_parser.SetSpace(space);
|
||||
|
||||
return (conf_parser.ParseSpace(meta_str) == pt::SpaceParser::ok);
|
||||
return (conf_parser.ParseSpace(meta_str, space) == pt::SpaceParser::ok);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -78,9 +78,8 @@ bool GroupInfo::ParseGroups(const std::wstring & str, Groups & groups)
|
|||
{
|
||||
groups.Clear();
|
||||
pt::Space & space = *groups.GetSpace();
|
||||
conf_parser.SetSpace(space);
|
||||
|
||||
if( conf_parser.ParseSpace(str) == pt::SpaceParser::ok )
|
||||
if( conf_parser.ParseSpace(str, space) == pt::SpaceParser::ok )
|
||||
{
|
||||
groups.Reindex();
|
||||
}
|
||||
|
|
|
@ -76,8 +76,7 @@ void ReloadConfigFile(PluginInfo & info, Item & file)
|
|||
pt::Space space;
|
||||
pt::SpaceParser parser;
|
||||
|
||||
parser.SetSpace(space);
|
||||
pt::SpaceParser::Status status = parser.ParseSpace(file.item_content.content_raw);
|
||||
pt::SpaceParser::Status status = parser.ParseSpace(file.item_content.content_raw, space);
|
||||
|
||||
if( status == pt::SpaceParser::syntax_error )
|
||||
{
|
||||
|
|
|
@ -166,10 +166,9 @@ bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::wstring & path)
|
|||
log << log3 << "Ticket: parsing conf file: " << path << logend;
|
||||
|
||||
conf_tab[mount_dir_id].file_name = path;
|
||||
conf_parser.SetSpace(conf_tab[mount_dir_id].conf);
|
||||
conf_tab[mount_dir_id].conf.clear();
|
||||
pt::Space & space = conf_tab[mount_dir_id].conf;
|
||||
|
||||
return (conf_parser.ParseSpace(config_file.item_content.content_raw) == pt::SpaceParser::ok);
|
||||
return (conf_parser.ParseSpace(config_file.item_content.content_raw, space) == pt::SpaceParser::ok);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -112,8 +112,7 @@ bool read = false;
|
|||
file_name += '/';
|
||||
file_name += file;
|
||||
|
||||
loc_parser.SetSpace(temp_space);
|
||||
pt::SpaceParser::Status status = loc_parser.ParseSpaceFile(file_name);
|
||||
pt::SpaceParser::Status status = loc_parser.ParseSpaceFile(file_name, temp_space, false);
|
||||
|
||||
if( status == pt::SpaceParser::ok )
|
||||
{
|
||||
|
@ -185,9 +184,7 @@ bool read = false;
|
|||
file_name += '/';
|
||||
file_name += "substitute";
|
||||
|
||||
loc_parser.SetSpace(temp_space);
|
||||
|
||||
if( loc_parser.ParseSpaceFile(file_name) == pt::SpaceParser::ok )
|
||||
if( loc_parser.ParseSpaceFile(file_name, temp_space, false) == pt::SpaceParser::ok )
|
||||
{
|
||||
read = true;
|
||||
CreateSubstVector(subst_url, temp_space.to_wstr(L"url_original"), temp_space.to_wstr(L"url_changeto"));
|
||||
|
|
Loading…
Reference in New Issue