Opened 11 years ago

Closed 10 years ago

#1589 closed Defect (Fixed)

creating a new SILC connection fails

Reported by: folkert Owned by: timothy
Component: Colloquy (Mac) Version: 2.2 (Mac)
Severity: Normal Keywords:


creating a new SILC connection fails (sometimes)

-click 'new' in connection window

  • choose 'SILC' in 'new connection' window
  • enter nickname and server address in 'new connection' window
  • check 'remember this connection' in 'new connection' window
  • click 'connect'

new connection does not show up in connection window

new connection should show up in connection window

the reason for this seems to be a logical error in the -[MVConnectionsController connectNewConnection:] function. the values from the textfields, ie [newAddress stringValue] etc, are stored in the MVChatConnection objects member variables when doing [connection connectToServer:::] in MVConnectionsController.m:460. however, _saveBookmarkList expects those values to be present before, when called from addConnection::
so [connection server] would return NULL in MVConnectionsController.m:1669 and the new connection would not show up.

quick fix is to set the connections member vars before calling addConnection:

--- Controllers/MVConnectionsController.m (revision 4311)
+++ Controllers/MVConnectionsController.m (working copy)
@@ -446,6 +446,14 @@

[connection setRealName:[newRealName stringValue]];
if( [_joinRooms count] ) [connection joinChatRoomsNamed:_joinRooms];

+ if ([[newNickname stringValue] length])
+ [connection setNickname: [newNickname stringValue]];
+ if ([[newAddress stringValue] length])
+ [connection setServer: [newAddress stringValue]];
+ if ([newPort intValue])
+ [connection setServerPort: [newPort intValue]];

[self addConnection:connection keepBookmark:(BOOL)[newRemember state]];
[self setJoinRooms:_joinRooms forConnection:connection];

Change History (1)

comment:1 Changed 10 years ago by akempgen

  • milestone set to Colloquy 2.3
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [4569], thanks!

Note: See TracTickets for help on using tickets.