summaryrefslogtreecommitdiff
path: root/xc/lib/SM/sm_client.c
diff options
context:
space:
mode:
authormor <empty>1993-09-03 17:08:36 +0000
committermor <empty>1993-09-03 17:08:36 +0000
commitdd565865f713d6cdefece33db3123b6b5df084b4 (patch)
tree87fde4e0b50f5507fbca4fc02349f2c8c7853990 /xc/lib/SM/sm_client.c
parent41206ec54a51376fcebca67670abade7ce0878b4 (diff)
We might send another Get Properties before we got the Properties Reply
from a previous Get Properties. We keep a FIFO list of all the Get Properties sent.
Diffstat (limited to 'xc/lib/SM/sm_client.c')
-rw-r--r--xc/lib/SM/sm_client.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/xc/lib/SM/sm_client.c b/xc/lib/SM/sm_client.c
index 99f9f9056..dfeab3219 100644
--- a/xc/lib/SM/sm_client.c
+++ b/xc/lib/SM/sm_client.c
@@ -1,4 +1,4 @@
-/* $XConsortium$ */
+/* $XConsortium: client.c,v 1.1 93/09/03 13:25:08 mor Exp $ */
/******************************************************************************
Copyright 1993 by the Massachusetts Institute of Technology,
@@ -111,8 +111,8 @@ char *errorStringRet;
}
smcConn->call_data = callData;
- smcConn->prop_reply_cb = NULL;
smcConn->interact_cb = NULL;
+ smcConn->prop_reply_waits = NULL;
if (!IceProtocolSetup (iceConn, _SmcOpcode, _SmAuthCount, NULL,
&smcConn->proto_major_version, &smcConn->proto_minor_version,
@@ -274,15 +274,24 @@ SmcConn smcConn;
SmcPropReplyCB propReplyCB;
{
- if (smcConn->prop_reply_cb == NULL)
- {
- IceConn iceConn = smcConn->iceConn;
+ IceConn iceConn = smcConn->iceConn;
+ _SmcPropReplyWait *wait, *ptr;
- IceSimpleMessage (iceConn, _SmcOpcode, SM_GetProperties);
- IceFlush (iceConn);
+ wait = (_SmcPropReplyWait *) malloc (sizeof (_SmcPropReplyWait));
+ wait->prop_reply_cb = propReplyCB;
+ wait->next = NULL;
- smcConn->prop_reply_cb = propReplyCB;
- }
+ ptr = smcConn->prop_reply_waits;
+ while (ptr && ptr->next)
+ ptr = ptr->next;
+
+ if (ptr == NULL)
+ smcConn->prop_reply_waits = wait;
+ else
+ ptr->next = wait;
+
+ IceSimpleMessage (iceConn, _SmcOpcode, SM_GetProperties);
+ IceFlush (iceConn);
}