コード例 #1
0
/*
 * delete the entire list
 */
static void curses_connection_purge(void *conn)
{
   /* variable not used */
   (void) conn;

   DEBUG_MSG("curses_connection_purge");
   
   conntrack_purge();

   refresh_connections();
}
コード例 #2
0
/*
 * erase the connection list
 */
static void gtkui_connection_purge(void *conn)
{
   struct row_pairs *row, *nextrow, *list = connections;

   DEBUG_MSG("gtkui_connection_purge");

   connections = NULL;
   for(row = list; row; row = nextrow) {
       nextrow = row->next;
       free(row);
   }

   conntrack_purge();
   gtk_list_store_clear(GTK_LIST_STORE (ls_conns));
}