Carbon_name path hardcoded

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Carbon_name path hardcoded

Giordano Fechio (Giu)
Hello,

I am setting up the imap_stats for dovecot and stumb up on a problem with carbon_name setup.

const char *prefix = t_strdup_printf("dovecot.%s.global”,

But I need to setup the path myself so my index cam be compliant to the index I already have.

Wonder if changing it to something like the following so other users have a way to configure their own path or use the default in case they don’t want to worry about that.

                string_t *str = t_str_new(256);
-               const char *prefix = t_strdup_printf("dovecot.%s.global",
+        if ( strstr(carbon_name , "." != NULL) {
+                       const char *prefix = t_strdup_printf("",
                                                     stats_settings->carbon_name);
+        } else {
+                       const char *prefix = t_strdup_printf("dovecot.%s.global",
+                                                    stats_settings->carbon_name);
+        }


If that is not the goal or if I am not using it right , let me know.

Bests,
G Fechio