Move Avro creation into Avro::create

The Avro instance is now created inside a static class method. This brings
it in line with how other modules create instances.

Converted all strings to std::string and updated their usage.
This commit is contained in:
Markus Mäkelä
2018-05-23 07:35:43 +03:00
parent 2a76a36505
commit ec919c367b
6 changed files with 183 additions and 319 deletions

View File

@ -181,7 +181,7 @@ void avro_index_file(Avro *router, const char* filename)
void avro_update_index(Avro* router)
{
char path[PATH_MAX + 1];
snprintf(path, sizeof(path), "%s/*.avro", router->avrodir);
snprintf(path, sizeof(path), "%s/*.avro", router->avrodir.c_str());
glob_t files;
if (glob(path, 0, NULL, &files) != GLOB_NOMATCH)