1
0
Fork 0

VTY: Force init of everything, try to run finalizers..

This commit is contained in:
Holger Hans Peter Freyther 2010-09-13 18:56:56 +08:00
parent cf071f9b49
commit 6b5b830b0c
1 changed files with 12 additions and 0 deletions

View File

@ -136,6 +136,9 @@ Object subclass: OSMOVTY [
app_info name value: aName.
app_info version value: aVersion.
app_info copyright value: aLicense.
app_info tall_ctx value: 0.
app_info go_parent_cb value: 0.
app_info is_config_node value: 0.
OSMOVTY vty_init: app_info.
OSMOVTY telnet_init: nil priv: nil port: 4444.
@ -174,6 +177,9 @@ Object subclass: VTYCommand [
command: aCommand [
<category: 'private'>
"We need to know when we are removed as we will segfault soon"
self addToBeFinalized.
command := aCommand.
callback := CCallbackDescriptor
for: [ :cmd :vty :argc :argv | self handleCommand: cmd vty: vty argc: argc argv: argv.]
@ -181,10 +187,16 @@ Object subclass: VTYCommand [
withArgs: #(#cObject #cObject #int #(#ptr #string)).
command func value: callback.
]
command [
<category: 'command'>
^ command
]
finalize [
Transcript show: 'Command is being removed... bad'.
super fianilize.
]
]
Eval [