From 095be92e4456d321a6883205b9328716efa30aab Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Fri, 10 Dec 2010 14:18:54 -0800 Subject: Export inSession to the perl api. --- lib/Vyatta/Config.pm | 7 +++++++ perl_dmod/Cstore/Cstore.xs | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index 69ed34b..187efa0 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -186,6 +186,13 @@ sub sessionChanged { return $self->{_cstore}->sessionChanged(); } +## inSession() +# returns whether in a config session +sub inSession { + my ($self) = @_; + return $self->{_cstore}->inSession(); +} + ## loadFile() # "load" the specified file sub loadFile { diff --git a/perl_dmod/Cstore/Cstore.xs b/perl_dmod/Cstore/Cstore.xs index 255eac0..8633a76 100644 --- a/perl_dmod/Cstore/Cstore.xs +++ b/perl_dmod/Cstore/Cstore.xs @@ -333,3 +333,9 @@ OUTPUT: RETVAL +bool +Cstore::inSession() +CODE: + RETVAL = THIS->inSession(); +OUTPUT: + RETVAL -- cgit v1.2.3