X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=program%2Fsrc%2Frrd_xport.c;h=b2afd1cb25fa0db3c7218e3401d249de6c8b376c;hb=74dd82adcc9b78162fed30100fad38c54a35036e;hp=4457b60f9478dbe13159137b3ec7b50ddd3baf0d;hpb=624c179153ca5878269ea9eaa79516832bbf20b1;p=rrdtool-all.git diff --git a/program/src/rrd_xport.c b/program/src/rrd_xport.c index 4457b60f..b2afd1cb 100644 --- a/program/src/rrd_xport.c +++ b/program/src/rrd_xport.c @@ -382,6 +382,18 @@ int rrd_graph_xport(image_desc_t *im) { rrd_value_t *data=NULL; /* initialize buffer */ stringbuffer_t buffer={0,0,NULL,NULL}; + + /* check if we have a supported ggraph format */ + switch (im->graph_type) { + /* allow the following to pass */ + case GTYPE_TIME: + case GTYPE_XY: + break; + default: + rrd_set_error("Not supported graph type"); + return -1; + } + /* if we write a file, then open it */ if (strlen(im->graphfile)) { buffer.file=fopen(im->graphfile,"w");