Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54177854ce | ||
|
|
041cda8a35 | ||
|
|
6c6e52536a | ||
|
|
630147ecdd | ||
|
|
36bf26e12a | ||
|
|
0bca5ebb7b | ||
|
|
858cfc81e4 | ||
|
|
74b287017b | ||
|
|
b74c9e7fa3 | ||
|
|
a792a8e86f | ||
|
|
40fd2d5dfb | ||
|
|
bfedc63eb6 | ||
|
|
6ab4732b85 |
No files matched your search
@@ -39,6 +39,7 @@ func ICCCListenerUpdateReceiver(data map[string][]string) (result map[string][]s
|
||||
updatedObject.Command = messageData.Command
|
||||
updatedObject.IPAddressPort = messageData.IPAddressPort
|
||||
updatedObject.IsActive = messageData.IsActiveNew
|
||||
updatedObject.Kind = messageData.Kind
|
||||
|
||||
// Update the entry:
|
||||
if errUpdate := collectionListener.Update(selectionUpdate, updatedObject); errUpdate != nil {
|
||||
|
||||
+3
-2
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/SommerEngineering/Ocean/Tools"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Sign a message to secure it.
|
||||
@@ -32,7 +33,7 @@ func signMessage(data map[string][]string) (result url.Values) {
|
||||
// Now, loop over all the data:
|
||||
for _, key := range keys {
|
||||
// Get the value:
|
||||
value := data[key]
|
||||
value := data[key][0]
|
||||
|
||||
// Hash each key and value:
|
||||
fmt.Fprintf(hash, "key=%s :: value=%s\n", key, value)
|
||||
@@ -42,6 +43,6 @@ func signMessage(data map[string][]string) (result url.Values) {
|
||||
result = url.Values(data)
|
||||
|
||||
// Append the sign:
|
||||
result.Add(`checksum`, fmt.Sprintf("%x", hash.Sum(nil)))
|
||||
result.Add(`checksum`, strings.ToUpper(fmt.Sprintf("%x", hash.Sum(nil))))
|
||||
return
|
||||
}
|
||||
@@ -6,4 +6,5 @@ type ICCCListenerUpdate struct {
|
||||
Command string
|
||||
IPAddressPort string
|
||||
IsActiveNew bool
|
||||
Kind byte
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package Log
|
||||
|
||||
// This function provides the project name for e.g. logging events
|
||||
// coming trough the ICCC.
|
||||
func GetProjectName() string {
|
||||
return projectName
|
||||
}
|
||||
+7
-1
@@ -121,10 +121,16 @@ func clearEntry(entry Meta.Entry) (result Meta.Entry) {
|
||||
// Remove white spaces from the parameters.
|
||||
func clearParameters(oldParameters []string) (result []string) {
|
||||
for n := 0; n < len(oldParameters); n++ {
|
||||
// Remove white spaces:
|
||||
oldParameters[n] = removeWhitespaces(oldParameters[n])
|
||||
|
||||
// Is content left after removing?
|
||||
if oldParameters[n] != `` {
|
||||
// Yes, some content is still there. Thus, commit this entry:
|
||||
result = append(result, oldParameters[n])
|
||||
}
|
||||
}
|
||||
|
||||
result = oldParameters
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ func ICCCNewLogEventReceiver(data map[string][]string) (result map[string][]stri
|
||||
|
||||
// Provide a log entry:
|
||||
logEntry := LM.Entry{}
|
||||
logEntry.Project = Log.GetProjectName()
|
||||
logEntry.Sender = LM.Sender(messageData.Sender)
|
||||
logEntry.Category = LM.ParseCategory(messageData.Category)
|
||||
logEntry.Level = LM.ParseLevel(messageData.Level)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Version
|
||||
|
||||
var (
|
||||
oceansVersion string = `2.0.2` // Ocean's current version
|
||||
oceansVersion string = `2.0.4` // Ocean's current version
|
||||
)
|
||||
Reference in new issue
Block a user