SR_PRIV void sr_zip_discard(struct zip *archive)
{
if (zip_unchange_all(archive) < 0 || zip_close(archive) < 0)
SR_PRIV void sr_zip_discard(struct zip *archive)
{
if (zip_unchange_all(archive) < 0 || zip_close(archive) < 0)
* @param[in] archive An open ZIP archive.
* @param[in] entry Stat buffer filled in for the metadata archive member.
* @param[in] archive An open ZIP archive.
* @param[in] entry Stat buffer filled in for the metadata archive member.
*/
SR_PRIV GKeyFile *sr_sessionfile_read_metadata(struct zip *archive,
const struct zip_stat *entry)
*/
SR_PRIV GKeyFile *sr_sessionfile_read_metadata(struct zip *archive,
const struct zip_stat *entry)
SR_PRIV struct sr_dev_inst *sr_session_prepare_sdi(const char *filename, struct sr_session **session)
{
struct sr_dev_inst *sdi = NULL;
SR_PRIV struct sr_dev_inst *sr_session_prepare_sdi(const char *filename, struct sr_session **session)
{
struct sr_dev_inst *sdi = NULL;
int unitsize;
char **sections, **keys, *val;
char channelname[SR_MAX_CHANNELNAME_LEN + 1];
int unitsize;
char **sections, **keys, *val;
char channelname[SR_MAX_CHANNELNAME_LEN + 1];
sections = g_key_file_get_groups(kf, NULL);
for (i = 0; sections[i] && ret == SR_OK; i++) {
if (!strcmp(sections[i], "global"))
sections = g_key_file_get_groups(kf, NULL);
for (i = 0; sections[i] && ret == SR_OK; i++) {
if (!strcmp(sections[i], "global"))
sr_config_set(sdi, NULL, SR_CONF_CAPTUREFILE,
g_variant_new_string(val));
g_free(val);
sr_config_set(sdi, NULL, SR_CONF_CAPTUREFILE,
g_variant_new_string(val));
g_free(val);
g_free(val);
sr_config_set(sdi, NULL, SR_CONF_SAMPLERATE,
g_variant_new_uint64(tmp_u64));
g_free(val);
sr_config_set(sdi, NULL, SR_CONF_SAMPLERATE,
g_variant_new_uint64(tmp_u64));
unitsize = g_key_file_get_integer(kf, sections[i],
keys[j], &error);
if (!sdi || unitsize <= 0 || error) {
unitsize = g_key_file_get_integer(kf, sections[i],
keys[j], &error);
if (!sdi || unitsize <= 0 || error) {