diff options
author | deva <deva> | 2006-08-16 23:49:23 +0000 |
---|---|---|
committer | deva <deva> | 2006-08-16 23:49:23 +0000 |
commit | 347b1d8ed3a4f780f3a5c0d57a04eab05ca517a2 (patch) | |
tree | dc21975923fb440c78ee4bbffc645a138071978f /server/img_encoder.cc | |
parent | 6c07f9219bed6ccddc9b65ad40414cf0a9f7d633 (diff) |
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.
Diffstat (limited to 'server/img_encoder.cc')
-rw-r--r-- | server/img_encoder.cc | 9 |
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"); } |