[ekg2-commit] ekg2: xmsg.c (HEAD) [peres]

CVS commit cvs w toxygen.net
Wto, 1 Maj 2007, 16:13:01 CEST


Module name:	ekg2
Changes by:	peres	2007-05-01 16:12:59

Modified files:
	xmsg.c

Log message:
Enabling locking in plugins (unlocking is in PROTOCOL_DISCONNECTED):
- GG - we can have only one connection to one account,
- Jabber - we can have more than one connection, but they have to have
  different resources; we must assume the same session has the same resource,
- XMSG - we can have more than one connection, but it doesn't make any sense.
XXX: What about feed plugin?

Index: xmsg.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/xmsg/xmsg.c,v
diff -d -u -r1.22 -r1.23
--- xmsg.c	11 Apr 2007 19:31:41 -0000	1.22
+++ xmsg.c	1 May 2007 14:12:59 -0000	1.23
@@ -442,6 +442,8 @@
 		printq("already_connected", session_name(session));
 		return -1;
 	}
+	if (command_exec(NULL, session, "/session --lock", 0) == -1)
+		return -1;
 
 	if (xmsg_add_watch(session, session_uid_get(session)+XMSG_UID_DIROFFSET)) {
 		print("conn_failed", format_find("xmsg_addwatch_failed"), session_name(session));


Więcej informacji o liście dyskusyjnej ekg2-commit