From: tmcconne@sedona.intel.com (Tom McConnell~)
Newsgroups: fj.mail-lists.x-window
Subject: Re: mit X11R5 server on RS6000/AIX3.2
Date: 12 Sep 92 08:34:38 GMT
Distribution: fj
Organization: Intel Corporation

Date: 10 Sep 92 21:30:03 GMT
Message-Id: <1992Sep10.213003.22515@ichips.intel.com>
Newsgroups: comp.windows.x


In article <pete.716104546@frosty>, pete@frosty.Rational.COM (Pete Coe) writes:
> We are trying to get the mit X11R5 server built for our RS/6000's.  What we have
> ended up with is a server that appears to work, but an xinit that will not talk
> to it.  Typing xinit brings up a server, but a log file for xinit indicates that
> the server is not accepting connections.  However you can target xterm's etc to
> the display.  Eventually xinit gives up and kills the server.  We have upto
> patch 17, but nothing seems to affect this.  Does anybody have some idea of what
> to do about this.
> --
> --                                    
> -- Pete Coe
> -- Rational
> -- Object-Oriented Products

  If you are running under AIX 3.2, then this may be your problem.

    Cheers,

    Tom McConnell

Date: Wed, 11 Mar 92 15:03:42 PST
From: Minh Tran-Le <TRANLE@intellicorp.com>
Subject: Xlib: unaddr not initialized correctly in MakeUNIXSocketConnection.
Reply-to: tranle@intellicorp.com

### bug number:   5045
### area:         Xlib
### severity:     low
### comments:     

VERSION:
    R5, public-patch-9

CLIENT MACHINE and OPERATING SYSTEM:
    IBM RS6000/AIX 3.2

DISPLAY TYPE:
    SkyWay (gda0)

WINDOW MANAGER:
    mwm

COMPILER:
    native cc

AREA:
    Xlib

SYNOPSIS:
    The structure unaddr is not initialized correctly in the function
    MakeUNIXSocketConnection.

DESCRIPTION:
    The initialization of the unaddr.sun_len is not done in the
    the function MakeUNIXSocketConnection().  The sun_len field
    should be set to the length of the sun_path field.

    And the computation of addrlen the length of the sockaddr structure
    is also wrong because it assume that the structure has only 2
    field sun_family and sun_path.

REPEAT BY:
    Compile Xlib under AIX 3.2 and all the clients will fail to open
    the display :0.0.

SAMPLE FIX:
    Here is a context diff for my changes to mit/lib/XConnDis.c.
    The setting of unaddr.sun_len should really be conditionalized
    for AIX V3.2.

*** XConnDis.c-	Fri Sep 13 18:20:28 1991
--- XConnDis.c	Wed Mar 11 11:29:51 1992
***************
*** 442,450 ****
  
      unaddr.sun_family = AF_UNIX;
      sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
  
      addr = (struct sockaddr *) &unaddr;
!     addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
  
  #ifdef hpux /* this is disgusting */
      ounaddr.sun_family = AF_UNIX;
--- 442,451 ----
  
      unaddr.sun_family = AF_UNIX;
      sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
+     unaddr.sun_len = strlen(unaddr.sun_path);
  
      addr = (struct sockaddr *) &unaddr;
!     addrlen = (sizeof(unaddr) - sizeof(unaddr.sun_path) + unaddr.sun_len);
  
  #ifdef hpux /* this is disgusting */
      ounaddr.sun_family = AF_UNIX;

-------

-- 
 Tom McConnell          |     Internet: tmcconne@sedona.intel.com
 Intel, Corp. C3-91     |     Phone: (602)-554-8229
 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
 Chandler, AZ  85226    | their right mind would claim them.