- if (c1 < '1' || c1 > '3' || c2 != ':') {
- rrd_set_error("Malformed LINE command: %s",line);
- return 1;
+ if (c1 == ':'){
+ gdp->linewidth=1;
+ } else {
+ double width;
+ *eaten+=i;
+ if (sscanf(&line[*eaten],"%lf%n:",&width,&i)){
+ if (width < 0 || isnan(width) || isinf(width) ){
+ rrd_set_error("LINE width is %lf. It must be finite and >= 0 though",width);
+ return 1;
+ }
+ gdp->linewidth=width;
+ } else {
+ rrd_set_error("LINE width: %s",line);
+ return 1;
+ }