> From: Mark Thomas [mailto:ma...@apache.org] 
> Subject: Re: svn commit: r1607278 - /tomcat/native/trunk/native/src/ssl.c

> I need to brush up on my C to get my head around why, but this commit
> has broken the build.

> Modified: tomcat/native/trunk/native/src/ssl.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1607278&r1=1607277&r2=1607278&view=diff
> ==============================================================================
> --- tomcat/native/trunk/native/src/ssl.c (original)
> +++ tomcat/native/trunk/native/src/ssl.c Wed Jul  2 08:19:21 2014
> @@ -871,8 +871,8 @@ static int jbs_write(BIO *b, const char 
>      if (b->init && in != NULL) {
>          BIO_JAVA *j = (BIO_JAVA *)b->ptr;
>          JNIEnv   *e = NULL;
> -        jbyteArray jb = (*e)->NewByteArray(e, inl);
>          tcn_get_java_env(&e);
> +        jbyteArray jb = (*e)->NewByteArray(e, inl);
>          if (!(*e)->ExceptionOccurred(e)) {
>              (*e)->SetByteArrayRegion(e, jb, 0, inl, (jbyte *)in);
>              ret = (*e)->CallIntMethod(e, j->cb.obj,
> @@ -890,8 +890,8 @@ static int jbs_read(BIO *b, char *out, i
>      if (b->init && out != NULL) {
>          BIO_JAVA *j = (BIO_JAVA *)b->ptr;
>          JNIEnv   *e = NULL;
> -        jbyteArray jb = (*e)->NewByteArray(e, outl);
>          tcn_get_java_env(&e);
> +        jbyteArray jb = (*e)->NewByteArray(e, outl);
>          if (!(*e)->ExceptionOccurred(e)) {
>              ret = (*e)->CallIntMethod(e, j->cb.obj,
>                                        j->cb.mid[1], jb);

This is C, not C++, so the declaration for jb must come before any 
non-declaration statements within the block:

       BIO_JAVA *j = (BIO_JAVA *)b->ptr;
       JNIEnv   *e = NULL;
       jbyteArray jb;
       tcn_get_java_env(&e);
       jb = (*e)->NewByteArray(e, inl);

 - Chuck


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to