From 347b1d8ed3a4f780f3a5c0d57a04eab05ca517a2 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Aug 2006 23:49:23 +0000 Subject: Replaced the old MiavConfig class with the new Configuration class in all the the appropriate places. Crippled the MulticastConfiguration class. This must be rewritten to use the new configuration interface. --- server/img_encoder.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server/img_encoder.cc') 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 -#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"); } -- cgit v1.2.3