Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jonathan Coetzee
Knot Resolver
Commits
cf508c7b
Commit
cf508c7b
authored
Nov 13, 2015
by
Marek Vavruša
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/tinyweb: cleanup on exit
parent
f3b32a2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
modules/modules.mk
modules/modules.mk
+1
-1
modules/tinyweb/tinyweb.go
modules/tinyweb/tinyweb.go
+4
-0
No files found.
modules/modules.mk
View file @
cf508c7b
...
...
@@ -58,7 +58,7 @@ endef
define
go_target
$(1)
:=
$(2)
/
$(1)$(LIBEXT)
$(2)/$(1)$(LIBEXT)
:
$$($(1)_SOURCES) $$($(1)_DEPEND)
@
echo
" GO
$(2)
"
;
CGO_CFLAGS
=
"
$(BUILD_CFLAGS)
"
CGO_LDFLAGS
=
"
$$
(
$(1)
_LIBS)"
$(GO)
build
-buildmode
=
c-shared
-o
$$
@
$$
(
$(1)
_SOURCES
)
@
echo
" GO
$(2)
"
;
CGO_CFLAGS
=
"
$(BUILD_CFLAGS)
"
CGO_LDFLAGS
=
"
$$
(
$(1)
_LIBS)
$(CFLAGS)
"
$(GO)
build
-buildmode
=
c-shared
-o
$$
@
$$
(
$(1)
_SOURCES
)
$(1)-clean
:
$(RM)
-r
$(2)
/
$(1)
.h
$(2)
/
$(1)$(LIBEXT)
ifeq
($$(strip $$($(1)_INSTALL)),)
...
...
modules/tinyweb/tinyweb.go
View file @
cf508c7b
...
...
@@ -14,6 +14,7 @@ static inline const knot_layer_api_t *_layer(void)
import
"C"
import
(
"os"
"runtime"
"unsafe"
"fmt"
"net"
...
...
@@ -187,6 +188,9 @@ func tinyweb_config(module *C.struct_kr_module, conf *C.char) int {
//export tinyweb_deinit
func
tinyweb_deinit
(
module
*
C
.
struct_kr_module
)
int
{
geo_db
=
nil
geo_db6
=
nil
runtime
.
GC
()
return
0
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment