++*package_count;
}
- return package_count;
+ return *package_count;
}
user_data.fil_db = fil_db;
user_data.oth_db = oth_db;
user_data.changelog_limit = cmd_options->changelog_limit;
- user_data.location_base = cmd_options->location_base;
user_data.checksum_type_str = cr_checksum_name_str(cmd_options->checksum_type);
user_data.checksum_type = cmd_options->checksum_type;
user_data.checksum_cachedir = cmd_options->checksum_cachedir;
user_data.cut_dirs = cmd_options->cut_dirs;
user_data.location_prefix = cmd_options->location_prefix;
+ if ( cmd_options->split && ! cmd_options->location_base)
+ user_data.location_base = "media://";
+ else
+ user_data.location_base = cmd_options->location_base;
+
g_debug("Thread pool user data ready");
// Start pool
goto errexit;
// cut off trailing slashes from urls e.g. media:// -> media:
- gsize lb_length = strlen(location_base);
- gchar *t_location_base;
+ gsize lb_length = strlen(location_base);
+ gchar *t_location_base = g_malloc0(sizeof(location_base));
char suf[2];
strncpy(suf,&location_base[lb_length-2],2);
pkg->location_href = cr_safe_string_chunk_insert(pkg->chunk, location_href);
pkg->location_base = cr_safe_string_chunk_insert(pkg->chunk, t_location_base);
+ g_free(t_location_base);
+
// Get checksum type string
pkg->checksum_type = cr_safe_string_chunk_insert(pkg->chunk,
cr_checksum_name_str(checksum_type));