apache
[Top] [All Lists]

Re: modperl and 10x patches

To: wim@xxxxxxxxxx (wim bakker)
Subject: Re: modperl and 10x patches
From: mja@xxxxxxxxxxxxxxxxxxx (Mike Abbott)
Date: Tue, 4 Jan 2000 17:32:43 -0800 (PST)
Cc: apache@xxxxxxxxxxx
In-reply-to: <99122918253400.13089@xxxxxxxxxxxxxxxx> from "wim bakker" at Dec 29, 1999 06:25:34 PM
Sender: owner-apache@xxxxxxxxxxx
> When trying to compile in modperl with the 10x patches I get the following 
> error.:
> Connection.xs: In function `XS_Apache__Connection_remote_ip':
> Connection.xs:102: incompatible types in assignment
> How can I solve this?

Yup, looks like an incompatibility I introduced.  The first of several
I'm sure.

The offending bit of code in my mod_perl tree looks like this:
    if(items > 1)
         conn->remote_ip = pstrdup(conn->pool, (char *)SvPV(ST(1),na));

I changed the remote_ip member of struct conn_rec from a char* to a
char[] so assigning to it is no longer valid.  You can change it back or
you can change mod_perl's Connection.xs to copy to the string rather
than assign to it.  You will also need to update the new member
remote_ip_len.  The new bit of code looks like this and compiles for me:

    if(items > 1) {
         strcpy(conn->remote_ip, (char *)SvPV(ST(1),na));
         conn->remote_ip_len = strlen(conn->remote_ip);
    }
--
Michael J. Abbott        mja@xxxxxxx        http://reality.sgi.com/mja

<Prev in Thread] Current Thread [Next in Thread>
  • Re: modperl and 10x patches, Mike Abbott <=