From 1385d192c512da4d44d84623510f73be8d19b08d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 13 Sep 2001 05:00:50 +0000 Subject: [PATCH] stuff --- src/msm/Makefile.am | 19 +++++++++++++++++++ src/msm/server.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 src/msm/Makefile.am diff --git a/src/msm/Makefile.am b/src/msm/Makefile.am new file mode 100644 index 000000000..53d7c1fea --- /dev/null +++ b/src/msm/Makefile.am @@ -0,0 +1,19 @@ + +INCLUDES=@MSM_CFLAGS@ -DMSM_PKGDATADIR=\"$(datadir)/msm\" + +msm_SOURCES= \ + client.c \ + client.h \ + gui.c \ + gui.h \ + main.c \ + main.h \ + server.c \ + server.h \ + util.c \ + util.h + +noinst_PROGRAMS=msm + +msm_LDADD= @MSM_LIBS@ + diff --git a/src/msm/server.c b/src/msm/server.c index 02dc51dfc..d5de84d2d 100644 --- a/src/msm/server.c +++ b/src/msm/server.c @@ -43,6 +43,11 @@ #include "server.h" +/* FIXME we need to time out anytime we're waiting for a client + * response, such as InteractDone, SaveYourselfDone, ConnectionClosed + * (after sending Die) + */ + struct _MsmServer { GList *clients; @@ -374,8 +379,24 @@ set_properties_callback (SmsConn cnxn, int numProps, SmProp **props) { - + int i; + MsmClient *client; + MsmServer *server; + client = manager_data; + server = msm_client_get_server (client); + + i = 0; + while (i < numProps) + { + msm_client_set_property (client, props[i]); + + SmFreeProperty (props[i]); + + ++i; + } + + free (props); } static void @@ -384,18 +405,35 @@ delete_properties_callback (SmsConn cnxn, int numProps, char **propNames) { + int i; + MsmClient *client; + MsmServer *server; + client = manager_data; + server = msm_client_get_server (client); + + i = 0; + while (i < numProps) + { + msm_client_unset_property (propNames[i]); + + ++i; + } } static void get_properties_callback (SmsConn cnxn, SmPointer manager_data) { + MsmClient *client; + MsmServer *server; + client = manager_data; + server = msm_client_get_server (client); + msm_client_send_properties (client); } - static Status new_client_callback (SmsConn cnxn, SmPointer manager_data, @@ -800,6 +838,8 @@ accept_connection (GIOChannel *channel, * * If this causes problems, we can try adding a g_main_iteration() * in here. + * + * FIXME time this out eventually */ cstatus = IceConnectionStatus (cnxn); while (cstatus == IceConnectPending)