diff options
author | mor <empty> | 1993-09-03 17:08:36 +0000 |
---|---|---|
committer | mor <empty> | 1993-09-03 17:08:36 +0000 |
commit | dd565865f713d6cdefece33db3123b6b5df084b4 (patch) | |
tree | 87fde4e0b50f5507fbca4fc02349f2c8c7853990 /xc/lib/SM/sm_client.c | |
parent | 41206ec54a51376fcebca67670abade7ce0878b4 (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.c | 27 |
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); } |