zip_fclose(zf);
s[ret] = 0;
version = strtoull(s, NULL, 10);
- if (version != 1) {
+ if (version > 2) {
sr_dbg("Cannot handle sigrok session file version %d.", version);
return SR_ERR;
}
+ sr_spew("Detected sigrok session file version %d.", version);
/* read "metadata" */
if (zip_stat(archive, "metadata", 0, &zs) == -1) {
struct zip_file *zf;
struct zip_stat zs;
struct sr_dev_inst *sdi;
- struct sr_probe *probe;
+ struct sr_channel *probe;
int ret, probenum, devcnt, i, j;
uint64_t tmp_u64, total_probes, enabled_probes, p;
char **sections, **keys, *metafile, *val;
SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
unsigned char *buf, int unitsize, int units)
{
- struct sr_probe *probe;
+ struct sr_channel *probe;
GSList *l;
GVariant *gvar;
uint64_t samplerate;
return SR_ERR;
/* "version" */
- version[0] = '1';
+ version[0] = '2';
if (!(versrc = zip_source_buffer(zipfile, version, 1, 0)))
return SR_ERR;
if (zip_add(zipfile, "version", versrc) == -1) {