diff options
| author | Martin Willi <martin@revosec.ch> | 2015-02-27 14:03:35 +0100 |
|---|---|---|
| committer | Martin Willi <martin@revosec.ch> | 2015-03-18 13:59:14 +0100 |
| commit | fb8b119cfa85df54ff2eae090104566920fd00e0 (patch) | |
| tree | 743dd26c91ef49b4b92a144a10f5fb465ed27009 /src/libcharon/plugins/vici/ruby/lib | |
| parent | 61fb10c8cf2fd432b1f154d8c5b1aaa2c5b4c7a1 (diff) | |
| download | strongswan-fb8b119cfa85df54ff2eae090104566920fd00e0.tar.bz2 strongswan-fb8b119cfa85df54ff2eae090104566920fd00e0.tar.xz | |
vici: Use default Unix vici socket if none passed to ruby constructor
While we currently have a static path instead of one generated with Autotools,
this at least is congruent to what we have in the Python library.
Diffstat (limited to 'src/libcharon/plugins/vici/ruby/lib')
| -rw-r--r-- | src/libcharon/plugins/vici/ruby/lib/vici.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcharon/plugins/vici/ruby/lib/vici.rb b/src/libcharon/plugins/vici/ruby/lib/vici.rb index 852bcb615..f87e46e69 100644 --- a/src/libcharon/plugins/vici/ruby/lib/vici.rb +++ b/src/libcharon/plugins/vici/ruby/lib/vici.rb @@ -390,7 +390,10 @@ module Vici # during encoding. class Connection - def initialize(socket) + def initialize(socket = nil) + if socket == nil + socket = UNIXSocket.new("/var/run/charon.vici") + end @transp = Transport.new(socket) end |
