]> pilppa.org Git - lib1wire.git/blobdiff - src/Factory.cc
Started adding support for caches when reading data. Cache files for
[lib1wire.git] / src / Factory.cc
index 1ce585b003c23b8e42093696ae46ca4f4c6918f0..c8dc6949f957fe6f1c71b7e8f15338ad26d32eba 100644 (file)
@@ -42,6 +42,7 @@ W1Device *Factory::get_device(int family_code,
                        dirent *direntry_param) {
        W1Device        *ret_val;
        DeviceConfig    *config;
+       string          type;
 
        ret_val = NULL;
        switch(family_code) {
@@ -62,7 +63,6 @@ W1Device *Factory::get_device(int family_code,
                config  = get_device_config(device_id);
                if (config != NULL) {
                        // if not, create default device config
-                       string  type;
                        type    = config->get_cfg_value(DEVICE_CONFIG_VALUE_KEY__TYPE);
                        if (type.empty() == true) {
                                type    = ret_val->get_device_type();