Mono.Zeroconf
/trunk/src/Mono.Zeroconf.Providers.AvahiDBus/Mono.Zeroconf.Providers.AvahiDBus/RegisterService.cs |
@@ -38,10 +38,7 @@ |
private IAvahiEntryGroup entry_group; |
|
public event RegisterServiceEventHandler Response; |
|
private string originalName; |
private int retryNameModifier = 2; |
|
|
public RegisterService () |
{ |
} |
@@ -98,20 +95,12 @@ |
switch (state) { |
case EntryGroupState.Collision: |
if (!OnResponse (ErrorCode.Collision)) { |
if (originalName == null) |
originalName = Name; |
|
Name = originalName + " (" + retryNameModifier + ")"; |
retryNameModifier++; |
|
Console.WriteLine("ZeroConf had a name collision, trying: " + Name); |
|
Register(); |
throw new ApplicationException (); |
} |
break; |
case EntryGroupState.Failure: |
if (!OnResponse (ErrorCode.Failure)) { |
Console.WriteLine("Mono.ZeroConf failed to register name with AvahiDBus"); |
throw new ApplicationException (); |
} |
break; |
case EntryGroupState.Established: |