Fixed multiple entries with same key

If the reply from the asterisk server has multiple of the same key, they are override. This should fix that issue.
See: #233
This commit is contained in:
Deantwo 2020-07-20 23:34:22 +02:00 committed by GitHub
parent 6ca6304196
commit d2ed993a60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -647,7 +647,9 @@ namespace AsterNET
{
string name = line.Substring(0, delimiterIndex).ToLower(CultureInfo).Trim();
string val = line.Substring(delimiterIndex + 1).Trim();
if (val == "<null>")
if (list.ContainsKey(name))
list[name] += Environment.NewLine + val;
else if (val == "<null>")
list[name] = null;
else
list[name] = val;