Commit 0f8b1cce authored by Ghislain MARY's avatar Ghislain MARY

Use correct version number in the user-agent.

parent a1f63243
......@@ -71,6 +71,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RegistrationHelper.cs" />
<Compile Include="TileManager.cs" />
<Compile Include="$(OutDir)\Version.cs" />
<Compile Include="$(ProjectDir)..\submodules\mswp8vid\VideoRenderer.cs" />
<Compile Include="$(ProjectDir)..\submodules\mswp8vid\VideoStreamSource.cs" />
</ItemGroup>
......@@ -87,6 +88,9 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<PropertyGroup>
<PreBuildEvent>$(ProjectDir)\version.bat $(ProjectDir)</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
......
......@@ -67,11 +67,7 @@ namespace Linphone.Agents
OopServer.LinphoneCoreFactory.CreateLinphoneCore(null, config);
OopServer.LinphoneCore.SetRootCA("Assets/rootca.pem");
OopServer.LinphoneCore.SetChatDatabasePath(ApplicationData.Current.LocalFolder.Path + "\\chat.db");
OopServer.LinphoneCore.SetUserAgent("LinphoneWP8PushNotification", "");
//Globals.Instance.BackgroundModeLogger.Configure(true, OutputTraceDest.TCPRemote, "192.168.0.217:38954");
//Globals.Instance.LinphoneCoreFactory.OutputTraceListener = Globals.Instance.BackgroundModeLogger;
OopServer.LinphoneCore.SetUserAgent("LinphoneWP8PushNotification", Linphone.Version.Number);
OopServer.LinphoneCore.SetNetworkReachable(true);
OopServer.LinphoneCore.IterateEnabled = true;
}
......
......@@ -50,7 +50,7 @@ namespace Linphone.Agents
server.LinphoneCore.SetRootCA("Assets/rootca.pem");
server.LinphoneCore.SetChatDatabasePath(ApplicationData.Current.LocalFolder.Path + "\\chat.db");
server.LinphoneCore.SetNetworkReachable(true);
server.LinphoneCore.SetUserAgent("LinphoneWP8KeepAlive", "");
server.LinphoneCore.SetUserAgent("LinphoneWP8KeepAlive", Linphone.Version.Number);
server.LinphoneCore.IterateEnabled = true;
Debug.WriteLine("[KeepAliveAgent] Linphone Core created");
}
......
@ECHO off
SET gitlog=
FOR /f "delims=" %%a IN ('git log -1 "--pretty=format:%%H" %1\Customs.cs') DO SET gitlog=%%a
IF [%gitlog%] == [] GOTO UnknownGitVersion
FOR /f "delims=" %%a IN ('git describe --always') DO SET gitdescribe=%%a
GOTO End
:UnknownGitVersion
SET gitdescribe=unknown
:End
ECHO namespace Linphone { public sealed class Version { public static string Number = "%gitdescribe%"; } } > Version.cs
......@@ -285,7 +285,7 @@ namespace Linphone.Model
// Set user-agent because it is not set if coming back from background mode
try
{
server.LinphoneCore.SetUserAgent(Customs.UserAgent, XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value);
server.LinphoneCore.SetUserAgent(Customs.UserAgent, Linphone.Version.Number);
isLinphoneRunning = true;
return;
} catch {
......@@ -311,7 +311,7 @@ namespace Linphone.Model
DetectCameras();
}
server.LinphoneCore.SetUserAgent(Customs.UserAgent, XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value);
server.LinphoneCore.SetUserAgent(Customs.UserAgent, Linphone.Version.Number);
AddPushInformationsToContactParams();
lastNetworkState = DeviceNetworkInformation.IsNetworkAvailable;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment