]> sigrok.org Git - libsigrok.git/blobdiff - src/output/srzip.c
Build: Set local include directories in Makefile.am
[libsigrok.git] / src / output / srzip.c
index 690736c8f15c1425ed897a2976157a0a1798dcf8..ae066cde228b4f66a240458cf0f803281b0e6db4 100644 (file)
@@ -24,7 +24,7 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <zip.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #define LOG_PREFIX "output/srzip"
@@ -41,14 +41,14 @@ static int init(struct sr_output *o, GHashTable *options)
 
        (void)options;
 
-       outc = g_malloc0(sizeof(struct out_context));
-       o->priv = outc;
-
        if (strlen(o->filename) == 0) {
                sr_info("srzip output module requires a file name, cannot save.");
                return SR_ERR_ARG;
        }
+
+       outc = g_malloc0(sizeof(struct out_context));
        outc->filename = g_strdup(o->filename);
+       o->priv = outc;
 
        return SR_OK;
 }
@@ -317,6 +317,7 @@ SR_PRIV struct sr_output_module output_srzip = {
        .name = "srzip",
        .desc = "srzip session file",
        .exts = (const char*[]){"sr", NULL},
+       .flags = SR_OUTPUT_INTERNAL_IO_HANDLING,
        .options = get_options,
        .init = init,
        .receive = receive,