Compare commits

..

1 Commits

Author SHA1 Message Date
Trevor Payne
5d1aa3b024 Added a null check to determining SIP information
Resolves #290
2020-06-30 11:01:46 -05:00
5 changed files with 33 additions and 42 deletions

View File

@@ -1,8 +1,5 @@
$latestVersions = $(git tag --merged origin/main)
$latestVersion = [version]"0.0.0"
Write-Host "GITHUB_REF: $($Env:GITHUB_REF)"
Write-Host "GITHUB_HEAD_REF: $($Env:GITHUB_HEAD_REF)"
Write-Host "GITHUB_BASE_REF: $($Env:GITHUB_BASE_REF)"
Foreach ($version in $latestVersions) {
Write-Host $version
try {
@@ -20,13 +17,7 @@ Foreach ($version in $latestVersions) {
$newVersion = [version]$latestVersion
$phase = ""
$newVersionString = ""
switch -regex ($Env:GITHUB_REF) {
'^refs\/pull\/*.' {
$splitRef = $Env:GITHUB_REF -split "/"
$phase = "pr$($splitRef[2])"
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
}
'^refs\/heads\/main*.' {
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
}
@@ -52,7 +43,6 @@ switch -regex ($Env:GITHUB_REF) {
$phase = 'hotfix'
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
}
}

View File

@@ -8,9 +8,6 @@ on:
- bugfix/*
- release/*
- development
pull_request:
branches:
- development
env:
# solution path doesn't need slashes unless there it is multiple folders deep
@@ -32,7 +29,14 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
# And any submodules
- name: Checkout submodules
shell: bash
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
# Fetch all tags
- name: Fetch tags
run: git fetch --tags

View File

@@ -112,29 +112,17 @@ namespace PepperDash.Essentials.Core
return null;
}
Hr1x0WirelessRemoteBase remoteBase;
switch (type)
{
case ("hr100"):
remoteBase = new Hr100(rfId, gateway);
break;
return new Hr100(rfId, gateway);
case ("hr150"):
remoteBase = new Hr150(rfId, gateway);
break;
return new Hr150(rfId, gateway);
case ("hr310"):
remoteBase = new Hr310(rfId, gateway);
break;
return new Hr310(rfId, gateway);
default:
return null;
}
// register the device when using an internal RF gateway
if (props.GatewayDeviceKey == "processor")
{
remoteBase.RegisterWithLogging(config.Key);
}
return remoteBase;
}
static void gateway_BaseEvent(GenericBase device, BaseEventArgs args)
@@ -261,4 +249,4 @@ namespace PepperDash.Essentials.Core
trilist.BooleanInput[join].BoolValue = b;
}
}
}
}

View File

@@ -1658,7 +1658,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{
get
{
if (CodecStatus.Status.SIP.Registration.Count > 0)
if (CodecStatus.Status.SIP != null && CodecStatus.Status.SIP.Registration.Count > 0)
{
var match = Regex.Match(CodecStatus.Status.SIP.Registration[0].URI.Value, @"(\d+)"); // extract numbers only
if (match.Success)
@@ -1678,17 +1678,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
return string.Empty;
}
}
}
public override string SipUri
{
get
{
if (CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
else
return string.Empty;
}
}
}
public override string SipUri
{
get
{
if (CodecStatus.Status.SIP != null && CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value != null)
{
return CodecStatus.Status.SIP.AlternateURI.Primary.URI.Value;
}
else if (CodecStatus.Status.UserInterface != null &&
CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value != null)
{
return CodecStatus.Status.UserInterface.ContactInfo.ContactMethod[0].Number.Value;
}
else
return string.Empty;
}
}
public override bool AutoAnswerEnabled
{
get