summaryrefslogtreecommitdiff
path: root/xc/lib/SM
diff options
context:
space:
mode:
authormor <empty>1994-04-07 18:28:37 +0000
committermor <empty>1994-04-07 18:28:37 +0000
commit0799494eb17abb9f914db2baae492983cf671eb4 (patch)
treef7e28c4a71844d1329e66ac72ec7198e457560b3 /xc/lib/SM
parentb91382dcbd27c7a51c9013cf00666dc5809146f0 (diff)
SmcCloseConnection now returns SmcCloseStatus
Diffstat (limited to 'xc/lib/SM')
-rw-r--r--xc/lib/SM/sm_client.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/xc/lib/SM/sm_client.c b/xc/lib/SM/sm_client.c
index 8cdec6144..3331dacc3 100644
--- a/xc/lib/SM/sm_client.c
+++ b/xc/lib/SM/sm_client.c
@@ -1,4 +1,4 @@
-/* $XConsortium: sm_client.c,v 1.27 94/04/02 15:27:16 rws Exp $ */
+/* $XConsortium: sm_client.c,v 1.28 94/04/07 18:19:34 mor Exp $ */
/******************************************************************************
Copyright 1993 by the Massachusetts Institute of Technology,
@@ -240,7 +240,7 @@ char *errorStringRet;
-void
+SmcCloseStatus
SmcCloseConnection (smcConn, count, reasonMsgs)
SmcConn smcConn;
@@ -252,6 +252,8 @@ char **reasonMsgs;
smCloseConnectionMsg *pMsg;
char *pData;
int extra, i;
+ IceCloseStatus closeStatus;
+ SmcCloseStatus statusRet;
extra = 8;
@@ -272,7 +274,7 @@ char **reasonMsgs;
IceProtocolShutdown (iceConn, _SmcOpcode);
IceSetShutdownNegotiation (iceConn, False);
- IceCloseConnection (iceConn);
+ closeStatus = IceCloseConnection (iceConn);
if (smcConn->vendor)
free (smcConn->vendor);
@@ -298,6 +300,15 @@ char **reasonMsgs;
}
free ((char *) smcConn);
+
+ if (closeStatus == IceClosedNow)
+ statusRet = SmcClosedNow;
+ else if (closeStatus == IceClosedASAP)
+ statusRet = SmcClosedASAP;
+ else
+ statusRet = SmcConnectionInUse;
+
+ return (statusRet);
}