Skip to content

Commit

Permalink
GrowlConnector fixes (could hang if network connection is lost when r…
Browse files Browse the repository at this point in the history
…eceiving response);removed buggy dictionary of loaded plugins that could cause a crash with same-named types in different assemblies
  • Loading branch information
briandunnington committed Jun 3, 2010
1 parent fc293f9 commit 01da377
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 14 deletions.
Binary file modified Growl Connectors/NET/libraries/Growl.Connector.dll
Binary file not shown.
Binary file modified Growl Connectors/NET/libraries/Growl.CoreLibrary.dll
Binary file not shown.
Binary file modified Growl Extras/Growl Display SDK/libraries/Growl.CoreLibrary.dll
Binary file not shown.
Binary file modified Growl Extras/Growl Display SDK/libraries/Growl.DisplayStyle.dll
Binary file not shown.
8 changes: 8 additions & 0 deletions Growl/Growl.Connector/ConnectorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ private void SendAsync(object obj)
{
response += System.Text.Encoding.UTF8.GetString(buffer, 0, length);
}
else
{
break;
}
}
del(response);

Expand All @@ -290,6 +294,10 @@ private void SendAsync(object obj)
{
response += System.Text.Encoding.UTF8.GetString(buffer, 0, length);
}
else
{
break;
}
}
del(response);
}
Expand Down
4 changes: 2 additions & 2 deletions Growl/Growl.Connector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.3.5")]
[assembly: AssemblyInformationalVersion("2.0.3")]
[assembly: AssemblyFileVersion("2.0.4.1")]
[assembly: AssemblyInformationalVersion("2.0.4")]
4 changes: 2 additions & 2 deletions Growl/Growl.CoreLibrary/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.3.5")]
[assembly: AssemblyInformationalVersion("2.0.3")]
[assembly: AssemblyFileVersion("2.0.4.1")]
[assembly: AssemblyInformationalVersion("2.0.4")]
2 changes: 0 additions & 2 deletions Growl/Growl/_source/DisplayStyleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ internal sealed class DisplayStyleManager
private static string userDisplayStyleDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.UserSettingFolder, @"Displays" + Path.DirectorySeparatorChar);
private static string commonDisplayStyleDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.CommonPluginFolder, @"Displays" + Path.DirectorySeparatorChar);

private static Dictionary<string, LoadedDisplayStyle> currentlyLoadedDisplayStyles = new Dictionary<string, LoadedDisplayStyle>();
private static Dictionary<string, SettingsPanelBase> settingsPanels = new Dictionary<string, SettingsPanelBase>();
private static Dictionary<string, Display> availableDisplays = new Dictionary<string, Display>();
private static Dictionary<string, PluginInfo> loadedPlugins = new Dictionary<string, PluginInfo>();
Expand Down Expand Up @@ -174,7 +173,6 @@ private static void LoadInternal(IDisplay display, string installPath, string se
}

loadedDisplayStyle.Load();
currentlyLoadedDisplayStyles.Add(typeName, loadedDisplayStyle);

Utility.WriteDebugInfo(String.Format("Display '{0}' was loaded successfully", name));

Expand Down
4 changes: 0 additions & 4 deletions Growl/Growl/_source/ForwardDestinationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ internal sealed class ForwardDestinationManager
private static string userForwarderDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.UserSettingFolder, @"Forwarders" + Path.DirectorySeparatorChar);
private static string commonForwarderDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.CommonPluginFolder, @"Forwarders" + Path.DirectorySeparatorChar);

private static Dictionary<string, IForwardDestinationHandler> loadedHandlers = new Dictionary<string, IForwardDestinationHandler>();
private static List<IForwardDestinationHandler> loadedHandlersList = new List<IForwardDestinationHandler>();
private static Dictionary<string, PluginInfo> loadedPlugins = new Dictionary<string, PluginInfo>();
private static List<PluginInfo> loadedPluginsList = new List<PluginInfo>();
Expand Down Expand Up @@ -160,9 +159,6 @@ private static void LoadInternal(IForwardDestinationHandler fdh, string installP
if (fdh != null)
{
name = fdh.Name;
string typeName = fdh.GetType().FullName;

loadedHandlers.Add(typeName, fdh);
loadedHandlersList.Add(fdh);

List<Type> list = fdh.Register();
Expand Down
3 changes: 0 additions & 3 deletions Growl/Growl/_source/SubscriptionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ internal sealed class SubscriptionManager
private static string userSubscriberDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.UserSettingFolder, @"Subscribers" + Path.DirectorySeparatorChar);
private static string commonSubscriberDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.CommonPluginFolder, @"Subscribers" + Path.DirectorySeparatorChar);

private static Dictionary<string, ISubscriptionHandler> loadedHandlers = new Dictionary<string, ISubscriptionHandler>();
private static List<ISubscriptionHandler> loadedHandlersList = new List<ISubscriptionHandler>();
private static Dictionary<string, PluginInfo> loadedPlugins = new Dictionary<string, PluginInfo>();
private static List<PluginInfo> loadedPluginsList = new List<PluginInfo>();
Expand Down Expand Up @@ -157,9 +156,7 @@ private static void LoadInternal(ISubscriptionHandler ish, string installPath, s
if (ish != null)
{
name = ish.Name;
string typeName = ish.GetType().FullName;

loadedHandlers.Add(typeName, ish);
loadedHandlersList.Add(ish);

List<Type> list = ish.Register();
Expand Down
7 changes: 6 additions & 1 deletion Growl/Growl/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
2.0.4 changes (v2.0.4.x)
------------------------------
- fixed a bug in GrowlConnector that could cause a hang if the connection was lost in the middle of receiving a response


2.0.3v2 changes (v2.0.3.5)
------------------------------
- fixed a but in the IPv6 same-subnet handling
- fixed a bug in the IPv6 same-subnet handling

2.0.3 changes (v2.0.3.4)
------------------------------
Expand Down

0 comments on commit 01da377

Please sign in to comment.