[Nmailserver-commits] SF.net SVN: nmailserver: [140] NMail/trunk/NMail
Brought to you by:
dframpton-oss,
tmyroadctfig
|
From: <tmy...@us...> - 2007-02-10 03:58:52
|
Revision: 140
http://svn.sourceforge.net/nmailserver/?rev=140&view=rev
Author: tmyroadctfig
Date: 2007-02-09 19:58:53 -0800 (Fri, 09 Feb 2007)
Log Message:
-----------
Added some #ifdefs to exclude things not implemented in Mono 1.2.3.
Modified Paths:
--------------
NMail/trunk/NMail/DataTypes/Service/BaseService.cs
NMail/trunk/NMail.PostInstall/PostInstallForm.cs
Modified: NMail/trunk/NMail/DataTypes/Service/BaseService.cs
===================================================================
--- NMail/trunk/NMail/DataTypes/Service/BaseService.cs 2007-02-10 03:57:41 UTC (rev 139)
+++ NMail/trunk/NMail/DataTypes/Service/BaseService.cs 2007-02-10 03:58:53 UTC (rev 140)
@@ -29,6 +29,8 @@
using NMail.Configuration;
using NMail.Helper;
+// TODO: remove "#if !MONO" when perf counters are implemented in Mono
+
namespace NMail.DataTypes.Service {
/// <summary>
/// Provides a base class for services.
@@ -49,10 +51,12 @@
/// </summary>
private bool shutdown;
+#if !MONO
/// <summary>
/// The performance counter for tracking the number of received connections.
/// </summary>
private PerformanceCounter connectionsReceived;
+#endif
/// <summary>
/// Creates a new instance of the SMTP service.
@@ -62,10 +66,12 @@
this.sessionThreads = new List<Thread>();
this.shutdown = true;
+#if !MONO
this.connectionsReceived = new PerformanceCounter(
PerfCounterCategory,
TotalConnectionsReceived,
false);
+#endif
}
#region IService Members
@@ -208,7 +214,9 @@
while (true) {
Socket client = socket.AcceptSocket();
+#if !MONO
this.connectionsReceived.Increment();
+#endif
lock (this) {
if (this.ConnectionCount < this.MaximumConnections) {
Modified: NMail/trunk/NMail.PostInstall/PostInstallForm.cs
===================================================================
--- NMail/trunk/NMail.PostInstall/PostInstallForm.cs 2007-02-10 03:57:41 UTC (rev 139)
+++ NMail/trunk/NMail.PostInstall/PostInstallForm.cs 2007-02-10 03:58:53 UTC (rev 140)
@@ -30,6 +30,8 @@
using NMail.SmtpService;
+// TODO: remove "#if !MONO" when perf counters are implemented in Mono
+
namespace NMail.PostInstall {
public partial class PostInstallForm : Form {
@@ -45,13 +47,16 @@
}
private void DeleteSmtpServiceCounters() {
+#if !MONO
if (PerformanceCounterCategory.Exists(SmtpService.SmtpService.SmtpPerfCounterCategory)) {
// Remove any old performance counters if they are present
PerformanceCounterCategory.Delete(SmtpService.SmtpService.SmtpPerfCounterCategory);
}
+#endif
}
private void SetupSmtpServiceCounters() {
+#if !MONO
CounterCreationDataCollection ccdc = new CounterCreationDataCollection();
// Number of connections received
@@ -67,6 +72,7 @@
"Performance counters for NMail's SMTP service.",
PerformanceCounterCategoryType.SingleInstance,
ccdc);
+#endif
}
private bool NMailInstalled() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|