- applied andreas's patch
- logger output improvements - testin gupdates - and a lot more
This commit is contained in:
@@ -74,7 +74,7 @@ static void receive_packets(private_receiver_t * this)
|
||||
/* cancellation disabled by default */
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||
|
||||
this->logger->log(this->logger, CONTROL, "Receiver thread running, thread_id %u", (int)pthread_self());
|
||||
this->logger->log(this->logger, CONTROL, "receiver thread running, thread_ID: %06d", (int)pthread_self());
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ static void get_events(private_scheduler_t * this)
|
||||
/* cancellation disabled by default */
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||
|
||||
this->logger->log(this->logger, CONTROL, "Scheduler thread running, thread_id %u", (int)pthread_self());
|
||||
this->logger->log(this->logger, CONTROL, "scheduler thread running, thread_ID: %06d", (int)pthread_self());
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ static void send_packets(private_sender_t * this)
|
||||
/* cancellation disabled by default */
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||
|
||||
this->logger->log(this->logger, CONTROL, "Sender thread running, thread_id %u", (int)pthread_self());
|
||||
this->logger->log(this->logger, CONTROL, "sender thread running, thread_ID: %06d", (int)pthread_self());
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
||||
@@ -240,9 +240,6 @@ static void stroke_add_conn(private_stroke_t *this, stroke_msg_t *msg)
|
||||
my_id = cert->get_subject(cert);
|
||||
my_id = my_id->clone(my_id);
|
||||
cert->destroy(cert);
|
||||
this->logger->log(this->logger, CONTROL,
|
||||
"valid certificate with ID \"%s\"",
|
||||
my_id->get_string(my_id));
|
||||
}
|
||||
}
|
||||
if (msg->add_conn.other.cert)
|
||||
@@ -256,9 +253,6 @@ static void stroke_add_conn(private_stroke_t *this, stroke_msg_t *msg)
|
||||
other_id = cert->get_subject(cert);
|
||||
other_id = other_id->clone(other_id);
|
||||
cert->destroy(cert);
|
||||
this->logger->log(this->logger, CONTROL,
|
||||
"valid certificate with ID \"%s\"",
|
||||
other_id->get_string(other_id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,8 +272,15 @@ static void stroke_add_conn(private_stroke_t *this, stroke_msg_t *msg)
|
||||
proposal->add_algorithm(proposal, PROTO_IKE, DIFFIE_HELLMAN_GROUP, MODP_4096_BIT, 0);
|
||||
proposal->add_algorithm(proposal, PROTO_IKE, DIFFIE_HELLMAN_GROUP, MODP_8192_BIT, 0);
|
||||
connection->add_proposal(connection, proposal);
|
||||
|
||||
/* add to global connection list */
|
||||
charon->connections->add_connection(charon->connections, connection);
|
||||
this->logger->log(this->logger, CONTROL, "added connection \"%s\": %s[%s]...%s[%s]",
|
||||
msg->add_conn.name,
|
||||
my_host->get_address(my_host),
|
||||
my_id->get_string(my_id),
|
||||
other_host->get_address(other_host),
|
||||
other_id->get_string(other_id));
|
||||
|
||||
policy = policy_create(my_id, other_id);
|
||||
proposal = proposal_create(1);
|
||||
@@ -289,10 +290,10 @@ static void stroke_add_conn(private_stroke_t *this, stroke_msg_t *msg)
|
||||
policy->add_proposal(policy, proposal);
|
||||
policy->add_my_traffic_selector(policy, my_ts);
|
||||
policy->add_other_traffic_selector(policy, other_ts);
|
||||
|
||||
/* add to global policy list */
|
||||
charon->policies->add_policy(charon->policies, policy);
|
||||
|
||||
this->stroke_logger->log(this->stroke_logger, CONTROL|LEVEL1, "connection \"%s\" added", msg->add_conn.name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -144,7 +144,7 @@ static void process_jobs(private_thread_pool_t *this)
|
||||
/* cancellation disabled by default */
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||
|
||||
this->worker_logger->log(this->worker_logger, CONTROL, "Worker thread running, thread_id: %u", (int)pthread_self());
|
||||
this->worker_logger->log(this->worker_logger, CONTROL, "worker thread running, thread_ID: %06d", (int)pthread_self());
|
||||
|
||||
for (;;) {
|
||||
|
||||
@@ -600,7 +600,7 @@ thread_pool_t *thread_pool_create(size_t pool_size)
|
||||
{
|
||||
if (pthread_create(&(this->threads[current]), NULL, (void*(*)(void*))this->process_jobs, this) == 0)
|
||||
{
|
||||
this->pool_logger->log(this->pool_logger, CONTROL, "Created worker thread #%d", current+1);
|
||||
this->pool_logger->log(this->pool_logger, CONTROL, "created worker thread #%d", current+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user