Hi,

On Thu, Aug 20, 2015 at 11:56 AM, NormW <[email protected]> wrote:
>>
>> #    File: h2_session.c
>> # ---------------------
>> #
>> 512:nghttp2_session_callbacks_set_on_invalid_frame_recv_callback(*pcb,
>
> on_invalid_frame_recv_cb)
>>
>> #   Error:
>> ^
>> #   illegal implicit conversion
>> #   from 'int    (struct nghttp2_session *, const union  *,
>> @enum$24h2_session_c, void *)'
>> #   to   'int (*)(struct nghttp2_session *, const union  *, int, void *)'

It seems that the nghttp2_on_invalid_frame_recv_callback type requires
an int for its error parameter, not a nghttp2_error enum.

Does the attached patch helps?

Regards,
Yann.
Index: modules/http2/h2_session.c
===================================================================
--- modules/http2/h2_session.c	(revision 1696751)
+++ modules/http2/h2_session.c	(working copy)
@@ -112,7 +112,7 @@ static ssize_t send_cb(nghttp2_session *ngh2,
 
 static int on_invalid_frame_recv_cb(nghttp2_session *ngh2,
                                     const nghttp2_frame *frame,
-                                    nghttp2_error error, void *userp)
+                                    int error, void *userp)
 {
     h2_session *session = (h2_session *)userp;
     (void)ngh2;
@@ -126,7 +126,7 @@ static int on_invalid_frame_recv_cb(nghttp2_sessio
         frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
         ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
                       "h2_session: callback on_invalid_frame_recv error=%d %s",
-                      (int)error, buffer);
+                      error, buffer);
     }
     return 0;
 }

Reply via email to