[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] Help please
From:       Tiago Semprebom <tisemprebom () yahoo ! com ! br>
Date:       2006-07-05 12:34:29
Message-ID: 20060705123429.75882.qmail () web36114 ! mail ! mud ! yahoo ! com
[Download RAW message or body]


Ok Amish, first thank's for your answer. But I still have a problem. I'm trying to \
access the csd structure because I need to know the remote_addr in the csd function I \
use the csd->connect only for tests. I tryed to made a cast like you suggested but an \
error returns: worker.c:846: error: dereferencing pointer to incomplete type. I'm not \
getting to include the include "apr_arch_networkio.h ( worker.c:26:32: error: \
apr_arch_networkio.h: No such file or directory)


Any ideas?
[]'s

Tiago Semprebom

Amish shah <amish@net-square.com> escreveu: It looks like csd is a apr_socket_t type \
variable. Two possibilities for error,

1) if csd is a void* and in runtime if you assign apr_socket_t then you
might need to cast with (apr_socket_t *) before accessing "connected"
variable,

((apr_socket_t *)csd)->connected

2) if you look at the apr_socket_t structure definition in
apr_arch_networkio.h, the "connected" variable is,

#ifndef HAVE_POLL
    int connected;
#endif

So, to use HAVE_POLL macro shouldn't be defined while compilation.

I hope this helps.

Thanks,
--Amish

Tiago Semprebom wrote:
> Hello,
> 
> I'm trying to execute the follow line in the function *listener_thread in worker \
> mpm:  
> ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,"IP value: \
> %d",csd->connected); 
> But, when I try to compile an error return: worker.c:846: error: request for member \
> 'connected' in something not a structure or union 
> Thanks
> Tiago
> 
> 
> 
> ---------------------------------
> Yahoo! Search
> Música para ver e ouvir: You're Beautiful, do James Blunt
> 


-- 
Amish Shah
Chief Technology Officer
Net Square Solutions Pvt. Ltd.
amish@net-square.com
http://net-square.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
For additional commands, e-mail: apache-modules-help@covalent.net



 		
---------------------------------
 Yahoo! Search
 Música para ver e ouvir: You're Beautiful, do James Blunt



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic