Improve help/man page of para_filter.
[paraslash.git] / write_common.c
index 70a9a01..3bf5d11 100644 (file)
@@ -90,6 +90,7 @@ int wng_open(struct writer_node_group *g)
        }
        sprintf(g->task.status, "%s", "writer node group");
        register_task(&g->task);
+       g->open = 1;
        return 1;
 err_out:
        PARA_ERROR_LOG("%s\n", para_strerror(-ret));
@@ -112,7 +113,7 @@ void wng_close(struct writer_node_group *g)
 {
        int i;
 
-       if (!g)
+       if (!g || !g->open)
                return;
        PARA_NOTICE_LOG("closing wng with %d writer(s)\n", g->num_writers);
        FOR_EACH_WRITER_NODE(i, g) {