summaryrefslogtreecommitdiff
path: root/server/img_encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/img_encoder.cc')
-rw-r--r--server/img_encoder.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/img_encoder.cc b/server/img_encoder.cc
index df44686..c6670af 100644
--- a/server/img_encoder.cc
+++ b/server/img_encoder.cc
@@ -35,7 +35,7 @@
#include "img_encoder.h"
#include <stdio.h>
-#include "miav_config.h"
+#include "configuration.h"
#include "info.h"
extern "C" {
@@ -52,13 +52,14 @@ ImgEncoder::ImgEncoder(const char* cpr)
{
// Create path and filename
char fname[256];
- std::string *server_root;
+ std::string server_root;
char birthmonth[3];
char date[32];
char encrypted_cpr[32];
// Get server root
- server_root = MIaV::config->readString("server_image_root");
+ if(MIaV::config->get("server_image_root", &server_root))
+ MIaV::info->error("could not read symbol [server_image_root] from conf file!");
// Copy the bytes representing the birth month from the cpr
// [dd][mm][yy]-[nn][nn]
@@ -89,7 +90,7 @@ ImgEncoder::ImgEncoder(const char* cpr)
cnt++;
}
- sprintf(fname, "%s/%s/%s/%s-%s-", server_root->c_str(), birthmonth, encrypted_cpr, cpr, date);
+ sprintf(fname, "%s/%s/%s/%s-%s-", server_root.c_str(), birthmonth, encrypted_cpr, cpr, date);
file = new File(fname, "jpg");
}