You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by SAMEER KUMAR <sa...@gmail.com> on 2009/04/16 12:04:19 UTC

Problem using apr_thread_create() fucntion

Hi

I have problem uisng the apr_thread_create function...

I have used the following code:


where the definition of func and new_conn and cskt are:

apr_thread_start_t func=new_conn();
void new_conn(apr_socket_t **new_sock);
apr_socket_t *cskt;


when i try to call apr_thread_create as below:

apr_thread_create (&new_thread,tattr,func,&cskt,new_proc_pool);

i get this error while compilation:

echo_listner.c:26: error: too few arguments to function ‘new_conn’

Line 26 is : apr_thread_start_t func=new_conn();

It will be great if some one can help me solve this problem...

Regards,
Sameer Kumar
B.Tech, Computer Engineering
Institute of Technology,
Nirma University,
Ahmedabad, Gujarat
email: sameer.kasi200x@gmail.com
         05bce032@nirmauni.ac.in
Phone: +919375220396

Re: Problem using apr_thread_create() fucntion

Posted by Eric Covener <co...@gmail.com>.
On Thu, Apr 16, 2009 at 6:04 AM, SAMEER KUMAR <sa...@gmail.com> wrote:

>
> apr_thread_create (&new_thread,tattr,func,&cskt,new_proc_pool);
>
> i get this error while compilation:
>
> echo_listner.c:26: error: too few arguments to function ‘new_conn’
>
> Line 26 is : apr_thread_start_t func=new_conn();

I think you have a function call instead of a function pointer.

-- 
Eric Covener
covener@gmail.com