Update the connection state after SASL authentication result.
authorMikael Hallendal <micke@imendio.com>
Sat, 24 Feb 2007 02:23:46 +0100
changeset 226 5a31f474b9fd
parent 225 bf60cd9af13f
child 227 b8fa5635fb30
Update the connection state after SASL authentication result. The connections state were never updated after the SASL authentication was finished.
loudmouth/lm-connection.c
--- a/loudmouth/lm-connection.c	Sat Feb 24 02:22:55 2007 +0100
+++ b/loudmouth/lm-connection.c	Sat Feb 24 02:23:46 2007 +0100
@@ -801,6 +801,12 @@
 static void
 connection_call_auth_cb (LmConnection *connection, gboolean success)
 {
+	if (success) {
+		connection->state = LM_CONNECTION_STATE_AUTHENTICATED;
+	} else {
+		connection->state = LM_CONNECTION_STATE_OPEN;
+	}
+
 	if (connection->auth_cb) {
 	        LmCallback *cb = connection->auth_cb;