X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fsession_file.c;h=e27ed85c0adf3f256b6a76cefbfab62f8922816a;hp=26c0df7a3d88806b65e617f25815e86bbc0e66e7;hb=5e23fcab889c62864b92aa3ad6902ce3e9f5be49;hpb=bc497772512c2fd37516964ade58b69448aae37c diff --git a/src/session_file.c b/src/session_file.c index 26c0df7a..e27ed85c 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -122,7 +122,6 @@ SR_API int sr_session_load(const char *filename, struct sr_session **session) struct zip_file *zf; struct zip_stat zs; struct sr_dev_inst *sdi; - struct sr_channel *ch; int ret, i, j; uint64_t tmp_u64, total_channels, p; char **sections, **keys, *metafile, *val; @@ -212,9 +211,8 @@ SR_API int sr_session_load(const char *filename, struct sr_session **session) g_variant_new_uint64(total_channels), sdi, NULL); for (p = 0; p < total_channels; p++) { snprintf(channelname, SR_MAX_CHANNELNAME_LEN, "%" PRIu64, p); - ch = sr_channel_new(p, SR_CHANNEL_LOGIC, FALSE, + sr_channel_new(sdi, p, SR_CHANNEL_LOGIC, FALSE, channelname); - sdi->channels = g_slist_append(sdi->channels, ch); } } else if (!strncmp(keys[j], "probe", 5)) { if (!sdi) {