summaryrefslogtreecommitdiff
path: root/src/data/data_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/data_base.cpp')
-rw-r--r--src/data/data_base.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/data/data_base.cpp b/src/data/data_base.cpp
index 61fc141..ede07f5 100644
--- a/src/data/data_base.cpp
+++ b/src/data/data_base.cpp
@@ -57,6 +57,11 @@ void data_base::init_connections()
for ( int i = 0; i < i_min_con && i < i_max_con; i++ )
push_back( new con() );
+
+#ifdef NCURSES
+
+ print_queue_size();
+#endif
}
data_base::~data_base()
@@ -136,11 +141,24 @@ data_base::push_con( con* p_con )
{
pthread_mutex_lock( &mut_con );
push_front( p_con );
+#ifdef NCURSES
pthread_mutex_unlock( &mut_con );
wrap::system_message( DATAADD );
}
+#ifdef NCURSES
+void
+data_base::print_queue_size()
+{
+ if ( wrap::NCUR->is_ready() )
+ {
+ mvprintw( NCUR_CON_QUEUE_X,NCUR_CON_QUEUE_Y, "Con. queue: %d ", size());
+ refresh();
+ }
+}
+#endif
+
void
data_base::disconnect_all_connections()
{