curiousity
curiousity

Reputation: 4741

DotRAS phone book add entry BUG

I am working with DotRas version 1.3.5166 (the latest version from codeplex) and it seems that I have found a severe bug =((

I am trying to add a new entries in the rasphone.pbk

 foreach (Tuple<string, string> serv in servers)
            {
               // Item1 = connectionName 
               // Item2 = IP
                createEntryInPhonebook(serv.Item1, serv.Item2); // BreakPoint1 in this function
             }                                                  //BreakPoit 2

and

public void createEntryInPhonebook(string connectionName, string serverAddress)
        {
            if (this.phonebook.Entries.Contains(connectionName))
                return ;
            RasDevice device = RasDevice.GetDevices().Where(o => o.DeviceType == RasDeviceType.Vpn).First();
            RasEntry entry = RasEntry.CreateVpnEntry(connectionName, serverAddress, RasVpnStrategy.Default, RasDevice.GetDeviceByName("(PPTP)", RasDeviceType.Vpn), false);
            this.phonebook.Entries.Add(entry);
        } //// BreakPoint 1

At first step at Break Point1 I have

this.phonebook.Entries.Count = 1

BUT, at the same first step of my foreach loop I have at BreakPoint 2

this.phonebook.Entries.Count = 2; // !!!!!!

the enties are similar !!! they have the same connection name, IP address AND even this.phonebook.Entries[0].Id == this.phonebook.Entries[1].Id after this the programm is crashing if I try to add or remove any item/ I have found the same issue in codeplex provided sample =( (https://dotras.codeplex.com/releases/view/67408)

Upvotes: 0

Views: 696

Answers (0)

Related Questions