main.c
changeset 22 822094314703
parent 17 bd746609ba46
child 32 6dc2d52e4b13
--- a/main.c	Wed Nov 09 16:07:25 2011 -0800
+++ b/main.c	Fri May 04 08:33:21 2012 -0700
@@ -1,6 +1,6 @@
 /* vim: set noet nosta sw=4 ts=4 ft=c : */
 /*
-Copyright (c) 2011, Mahlon E. Smith <mahlon@martini.nu>
+Copyright (c) 2011-2012, Mahlon E. Smith <mahlon@martini.nu>
 All rights reserved.
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -30,6 +30,7 @@
 
 #include "volta.h"
 #include "db.h"
+#include "lua.h"
 
 struct v_globals v;
 
@@ -53,6 +54,7 @@
 	v.timer.db_lastcheck = 0;
 	v.timer.start        = time( NULL );
 	v.timer.lines        = 0;
+	v.lua                = luaV_setup();
 
 	/* get_opt vars */
 	int opt = 0;
@@ -131,6 +133,7 @@
 void
 shutdown_actions( void )
 {
+	lua_close( v.lua );
 	cdb_free( &v.db );
 	close( v.db_fd );
 	report_speed();