[uim-commit] r860 - trunk/uim
tkng at freedesktop.org
tkng at freedesktop.org
Thu Jun 2 00:30:34 PDT 2005
Author: tkng
Date: 2005-06-02 00:30:31 -0700 (Thu, 02 Jun 2005)
New Revision: 860
Modified:
trunk/uim/uim-helper-server.c
Log:
* uim/uim-helper-server.c:
- Quit when user logged out.
-(check_session_alive): New function.
Modified: trunk/uim/uim-helper-server.c
===================================================================
--- trunk/uim/uim-helper-server.c 2005-06-02 06:40:15 UTC (rev 859)
+++ trunk/uim/uim-helper-server.c 2005-06-02 07:30:31 UTC (rev 860)
@@ -202,6 +202,20 @@
return 1;
}
+static uim_bool
+check_session_alive(void)
+{
+ /* If there's no connection, we can assume user logged out. */
+ int i;
+ for (i = 0; i < nr_client_slots; i++) {
+ if (clients[i].fd != -1) {
+ return UIM_TRUE;
+ }
+ }
+ return UIM_FALSE; /* User already logged out */
+}
+
+
/* FIXME: This function is too long to read... */
static void
uim_helper_server_process_connection(int serv_fd)
@@ -318,6 +332,10 @@
}
}
}
+
+ if(check_session_alive() == UIM_FALSE) {
+ return;
+ }
}
}
More information about the uim-commit
mailing list