<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1629,7 +1629,7 @@ static VALUE handle_perform(VALUE self, ruby_curl_easy *rbce) {
   if (result != 0) {
 //    printf(&quot;error: %s\n&quot;, errors);
     if (rbce-&gt;failure_proc != Qnil) {
-      rb_funcall( rbce-&gt;failure_proc, idCall, 1, self );
+      rb_funcall( rbce-&gt;failure_proc, idCall, 2, rbce-&gt;self, INT2FIX(result) );
     } else {
       raise_curl_easy_error_exception(result);
     }
@@ -1641,7 +1641,7 @@ static VALUE handle_perform(VALUE self, ruby_curl_easy *rbce) {
   }
   else if (rbce-&gt;failure_proc != Qnil &amp;&amp; 
            (response_code &gt;= 300 &amp;&amp; response_code &lt;= 999)) {
-    rb_funcall( rbce-&gt;failure_proc, idCall, 1, self );
+    rb_funcall( rbce-&gt;failure_proc, idCall, 2, rbce-&gt;self, INT2FIX(result) );
   }
 
   return Qtrue;</diff>
      <filename>ext/curb_easy.c</filename>
    </modified>
    <modified>
      <diff>@@ -256,7 +256,7 @@ static void rb_curl_multi_read_info(VALUE self, CURLM *multi_handle) {
  
       if (result != 0) {
         if (rbce-&gt;failure_proc != Qnil) {
-          rb_funcall( rbce-&gt;failure_proc, idCall, 1, rbce-&gt;self );
+          rb_funcall( rbce-&gt;failure_proc, idCall, 2, rbce-&gt;self, INT2FIX(result) );
         }
       }
       else if (rbce-&gt;success_proc != Qnil &amp;&amp;
@@ -266,7 +266,7 @@ static void rb_curl_multi_read_info(VALUE self, CURLM *multi_handle) {
       }
       else if (rbce-&gt;failure_proc != Qnil &amp;&amp;
               (response_code &gt;= 300 &amp;&amp; response_code &lt;= 999)) {
-        rb_funcall( rbce-&gt;failure_proc, idCall, 1, rbce-&gt;self );
+        rb_funcall( rbce-&gt;failure_proc, idCall, 2, rbce-&gt;self, INT2FIX(result) );
       }
       rbce-&gt;self = Qnil;
     }</diff>
      <filename>ext/curb_multi.c</filename>
    </modified>
    <modified>
      <diff>@@ -471,7 +471,7 @@ class TestCurbCurlEasy &lt; Test::Unit::TestCase
     curl = Curl::Easy.new(&quot;#{$TEST_URL.gsub(/file:\/\//,'')}/not_here&quot;)
     on_failure_called = false
     curl.on_success {|c| } # make sure we get the failure call even though this handler is defined
-    curl.on_failure {|c| on_failure_called = true }
+    curl.on_failure {|c,code| on_failure_called = true }
     curl.perform
     assert on_failure_called, &quot;Failure handler not called&quot; 
   end</diff>
      <filename>tests/tc_curl_easy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -146,7 +146,7 @@ class TestCurbCurlMulti &lt; Test::Unit::TestCase
       #assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)
     end
 
-    c1.on_failure do|c|
+    c1.on_failure do|c,rc|
       #puts &quot;failure called: #{c.body_str.inspect}&quot;
     end
 </diff>
      <filename>tests/tc_curl_multi.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>22ec67496b54a808c6a6fd3078c78a8cf09905e7</id>
    </parent>
  </parents>
  <author>
    <name>Todd A. Fisher</name>
    <email>taf2@web3.anerian.com</email>
  </author>
  <url>http://github.com/taf2/curb/commit/4a8bd7e66be3ca27d0ce86850d46cfe82bce0d4f</url>
  <id>4a8bd7e66be3ca27d0ce86850d46cfe82bce0d4f</id>
  <committed-date>2009-06-17T18:19:28-07:00</committed-date>
  <authored-date>2009-06-17T18:19:28-07:00</authored-date>
  <message>include libcurl error code in on_failure callbacks</message>
  <tree>869b1fe819a67384b76419205261d3d2413e20d2</tree>
  <committer>
    <name>Todd A. Fisher</name>
    <email>taf2@web3.anerian.com</email>
  </committer>
</commit>
