diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-13 18:56:56 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-09-13 18:56:56 +0800 |
commit | 6b5b830b0c10ceb1aec794429a825a92f053762f (patch) | |
tree | e3e2f6b01f3f3ff3a224ef94e50b3051a70cdcfc | |
parent | cf071f9b496bb6409614cd2957bc16662c591b9f (diff) |
VTY: Force init of everything, try to run finalizers..
-rw-r--r-- | OsmoVTY.st | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 [ |