Hello,
I'm creating a priority queue pq in my hook (code below).
When I try to restart the httpd it return an error:
"undefined symbol: cache_pq_init"
I'm using the "apxs -c -o my_module" (in this phase
no erros return back)to compile my module and I've inserted the
#include"../cache/cache_pqueue.h" in my code.
Does anybody have idea how can I solve this problem?
thank's
Tiago
static int my_process_connection(conn_rec *c)
{
request_rec *r;
apr_socket_t *csd= NULL;
cache_pqueue_t* handle_p;
apr_ssize_t n_p =400;
cache_pqueue_get_priority pri_p;
cache_pqueue_getpos get_p;
cache_pqueue_setpos set_p;
apr_status_t status_p;
handle_p=cache_pq_init(n_p, pri_p, get_p, set_p); //create a pq
ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
while ((r = ap_read_request(c)) != NULL) {
c->keepalive = AP_CONN_UNKNOWN;
/* process the request if it was read without error */
ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
if (r->status == HTTP_OK){
status_p=cache_pq_insert(handle_p,r); //insert an item in the pq
ap_process_request(r);
}
if (ap_extended_status)
ap_increment_counts(c->sbh, r);
if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted)
break;
ap_update_child_status(c->sbh, SERVER_BUSY_KEEPALIVE, r);
apr_pool_destroy(r->pool);
if (ap_graceful_stop_signalled())
break;
if (!csd) {
csd = ap_get_module_config(c->conn_config, &core_module);
}
apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
apr_socket_timeout_set(csd,c->base_server->keep_alive_timeout);
}
return OK;
}