summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airliedfreedesktop.org>2005-08-31 01:24:01 +0000
committerDave Airlie <airliedfreedesktop.org>2005-08-31 01:24:01 +0000
commit3d4d6d29e2209a2ca701bff2c781078a82c6b229 (patch)
tree7a4c65bb966a38511f55f7ea39dcebf18717a908
parent275a563bea0c0eef7bcd52ddc493803acf94c37e (diff)
complete fix for miniglx startup issue since driver version checks
-rw-r--r--src/glx/mini/miniglx_events.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/glx/mini/miniglx_events.c b/src/glx/mini/miniglx_events.c
index 32a2d209314..6f3f3a17947 100644
--- a/src/glx/mini/miniglx_events.c
+++ b/src/glx/mini/miniglx_events.c
@@ -38,7 +38,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $Id: miniglx_events.c,v 1.4 2004/07/16 04:27:00 jonsmirl Exp $ */
+/* $Id: miniglx_events.c,v 1.5 2005/08/31 01:24:01 airlied Exp $ */
#include <assert.h>
@@ -258,6 +258,7 @@ static int welcome_message_part( Display *dpy, int i, void **msg, int sz )
if (!*msg) *msg = malloc(sz);
if (!*msg) return False;
if (!blocking_read( dpy, i, *msg, sz )) return False;
+ return sz;
}
else {
if (!send_msg( dpy, i, &sz, sizeof(sz))) return False;
@@ -283,18 +284,24 @@ static int welcome_message( Display *dpy, int i )
{
void *tmp = &dpy->driverContext.shared;
int *clientid = dpy->IsClient ? &dpy->clientID : &i;
-
+ int size;
+
if (!welcome_message_part( dpy, i, (void **)&clientid, sizeof(*clientid)))
return False;
if (!welcome_message_part( dpy, i, &tmp, sizeof(dpy->driverContext.shared)))
return False;
- if (!welcome_message_part( dpy, i,
+ size=welcome_message_part( dpy, i,
(void **)&dpy->driverContext.driverClientMsg,
- dpy->driverContext.driverClientMsgSize ))
+ dpy->driverContext.driverClientMsgSize );
+
+ if (!size)
return False;
+ if (dpy->IsClient) {
+ dpy->driverContext.driverClientMsgSize = size;
+ }
return True;
}