diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-02-26 15:48:11 -0800 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-02-27 17:49:05 +0000 |
commit | e2e955e442b8e47d9e88b4a6f334645bd33ef00f (patch) | |
tree | c15d0da5fb0d428dfc9e579f40c0297eebcaaa88 /sms-service/src | |
parent | cc2e23964a4609a9c405deb30c51864ff5e17254 (diff) |
Fixing the usage of pointer in config
Initializing the pointer before using it in JSON
decode. This was not erroring out before, but this
is the right usage.
Issue-ID: AAF-145
Change-Id: I9a4f8adbe946e896112a8fbef2a84b790578f780
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'sms-service/src')
-rw-r--r-- | sms-service/src/sms/config/config.go | 3 | ||||
-rw-r--r-- | sms-service/src/sms/smsconfig.json | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sms-service/src/sms/config/config.go b/sms-service/src/sms/config/config.go index b7f97d2..15f3660 100644 --- a/sms-service/src/sms/config/config.go +++ b/sms-service/src/sms/config/config.go @@ -44,8 +44,9 @@ func ReadConfigFile(file string) (*SMSConfiguration, error) { return nil, err } + SMSConfig = &SMSConfiguration{} decoder := json.NewDecoder(f) - err = decoder.Decode(&SMSConfig) + err = decoder.Decode(SMSConfig) if err != nil { return nil, err } diff --git a/sms-service/src/sms/smsconfig.json b/sms-service/src/sms/smsconfig.json index b683bf8..e8e8245 100644 --- a/sms-service/src/sms/smsconfig.json +++ b/sms-service/src/sms/smsconfig.json @@ -1,6 +1,6 @@ { "cafile": "auth/selfsignedca.pem", - "servercert": "auth/server_cat.cert", + "servercert": "auth/server.cert", "serverkey": "auth/server.key", "vaultaddress": "http://localhost:8200", |