stuff
This commit is contained in:
parent
82aa7363f9
commit
1385d192c5
19
src/msm/Makefile.am
Normal file
19
src/msm/Makefile.am
Normal file
@ -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@
|
||||||
|
|
@ -43,6 +43,11 @@
|
|||||||
|
|
||||||
#include "server.h"
|
#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
|
struct _MsmServer
|
||||||
{
|
{
|
||||||
GList *clients;
|
GList *clients;
|
||||||
@ -374,8 +379,24 @@ set_properties_callback (SmsConn cnxn,
|
|||||||
int numProps,
|
int numProps,
|
||||||
SmProp **props)
|
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
|
static void
|
||||||
@ -384,18 +405,35 @@ delete_properties_callback (SmsConn cnxn,
|
|||||||
int numProps,
|
int numProps,
|
||||||
char **propNames)
|
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
|
static void
|
||||||
get_properties_callback (SmsConn cnxn,
|
get_properties_callback (SmsConn cnxn,
|
||||||
SmPointer manager_data)
|
SmPointer manager_data)
|
||||||
{
|
{
|
||||||
|
MsmClient *client;
|
||||||
|
MsmServer *server;
|
||||||
|
|
||||||
|
client = manager_data;
|
||||||
|
server = msm_client_get_server (client);
|
||||||
|
|
||||||
|
msm_client_send_properties (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Status
|
static Status
|
||||||
new_client_callback (SmsConn cnxn,
|
new_client_callback (SmsConn cnxn,
|
||||||
SmPointer manager_data,
|
SmPointer manager_data,
|
||||||
@ -800,6 +838,8 @@ accept_connection (GIOChannel *channel,
|
|||||||
*
|
*
|
||||||
* If this causes problems, we can try adding a g_main_iteration()
|
* If this causes problems, we can try adding a g_main_iteration()
|
||||||
* in here.
|
* in here.
|
||||||
|
*
|
||||||
|
* FIXME time this out eventually
|
||||||
*/
|
*/
|
||||||
cstatus = IceConnectionStatus (cnxn);
|
cstatus = IceConnectionStatus (cnxn);
|
||||||
while (cstatus == IceConnectPending)
|
while (cstatus == IceConnectPending)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user