[erlang-questions] jungerl: lib/ssh patch...

Harley Gorrell <>
Wed Sep 13 08:27:22 CEST 2006


    I just tried to compile jungerl with R11B-1 and got a
compile error.  Looking at it, it appears that "buf->refc"
should be replaced with "driver_binary_get_refc(buf)".

    The jungerl list looks to be too quiet, so I am posting
this here.

---8<---snip---8<---snip---8<---snip---8<---snip---8<---

Index: loop_drv.c
===================================================================
RCS file: /cvsroot/jungerl/jungerl/lib/ssh/c_src/loop_drv.c,v
retrieving revision 1.1
diff -u -r1.1 loop_drv.c
--- loop_drv.c	19 Oct 2004 08:03:13 -0000	1.1
+++ loop_drv.c	13 Sep 2006 06:17:30 -0000
@@ -736,16 +736,16 @@
   */
  static void free_buffer(ErlDrvBinary* buf)
  {
-    DEBUGF(("free_buffer: %ld\r\n", (buf==NULL) ? 0 : buf->orig_size));
-
-    if (buf != NULL) {
-	if (buf->refc == 1)
-	    release_buffer(buf);
-	else {
+  DEBUGF(("free_buffer: %ld\r\n", (buf==NULL) ? 0 : buf->orig_size));
+ 
+	if (buf != NULL) {
+		if (driver_binary_get_refc(buf) == 1)
+      release_buffer(buf);
+    else {
  	    COUNT_BUF_FREE(buf->orig_size);
  	    driver_free_binary(buf);
-	}
      }
+  }
  }

---8<---snip---8<---snip---8<---snip---8<---snip---8<---

harley.



More information about the erlang-questions mailing list