log entries start with lowcercase character
[strongswan.git] / src / charon / config / connections / local_connection_store.c
index af0ee08..6dee9cc 100644 (file)
@@ -225,10 +225,14 @@ void log_connections(private_local_connection_store_t *this, logger_t *logger, c
                logger = this->logger;
        }
        
-       logger->log(logger, CONTROL, "Templates:");
-       
        pthread_mutex_lock(&(this->mutex));
+
        iterator = this->connections->create_iterator(this->connections, TRUE);
+
+       if (iterator->get_count(iterator))
+       {
+               logger->log(logger, CONTROL, "Templates:");
+       }
        while (iterator->has_next(iterator))
        {
                iterator->current(iterator, (void**)&current);