Code

fix for tcl bindings ... -- George Ross
[rrdtool-all.git] / program / bindings / tcl / tclrrd.c
index 92772571423a4ac88b698b4569080712e0da02d9..869d6c781147f528fd81a98adf03db607434c330 100644 (file)
@@ -243,7 +243,7 @@ static int Rrd_Flushcached(
         return TCL_ERROR;
     }
 
-    rrd_cmd_flush(argc, (char**)argv);
+    rrd_flushcached(argc, (char**)argv);
 
     if (rrd_test_error()) {
         Tcl_AppendResult(interp, "RRD Error: ",
@@ -504,7 +504,7 @@ static int Rrd_Graph(
          * Must dup() file descriptor so we can fclose(stream), otherwise the fclose()
          * would close Tcl's file descriptor
          */
-        if ((fd2 = dup((int) fd1)) == -1) {
+        if ((fd2 = dup((int)fd1)) == -1) {
             Tcl_AppendResult(interp,
                              "dup() failed for file descriptor associated with \"",
                              argv[1], "\": ", strerror(errno), (char *) NULL);
@@ -678,7 +678,7 @@ static int init(
     if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
         return TCL_ERROR;
 
-    if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
+    if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
         return TCL_ERROR;
     }