[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LDM Linux problems (fwd)



> Keywords: 199903150311.UAA24662
> Re: request for data kills LDM

Attached find a patch to src/protocol/h_clnt.c which fixes the
problem. This was a case of programmer error and inadaquate testing.

(I need glasses :-))

-glenn
Index: h_clnt.c
===================================================================
RCS file: /upc/share/CVS/ldm5/protocol/h_clnt.c,v
retrieving revision 1.78
retrieving revision 1.80
diff -c -r1.78 -r1.80
*** h_clnt.c    1999/03/02 17:11:34     1.78
--- h_clnt.c    1999/04/15 23:43:15     1.80
***************
*** 14,20 ****
   * Unidata, to assist in its use, correction, modification, or enhancement.
   *
   */
! /* $Id: h_clnt.c,v 1.78 1999/03/02 17:11:34 davis Exp $ */
  
  /* 
   * 
--- 14,20 ----
   * Unidata, to assist in its use, correction, modification, or enhancement.
   *
   */
! /* $Id: h_clnt.c,v 1.80 1999/04/15 23:43:15 davis Exp $ */
  
  /* 
   * 
***************
*** 592,600 ****
        if(isdigit((int)(*hcp->remote)))
        {
                /* dotted quad */
!               long saddr = inet_addr(hcp->remote);
  #ifndef INADDR_NONE
! #define INADDR_NONE ((unsigned long)(-1L))
  #endif
                if(saddr == INADDR_NONE)
                {
--- 592,600 ----
        if(isdigit((int)(*hcp->remote)))
        {
                /* dotted quad */
!               /* in_addr_t */ unsigned saddr = inet_addr(hcp->remote);
  #ifndef INADDR_NONE
! #define INADDR_NONE ((unsigned)(-1))
  #endif
                if(saddr == INADDR_NONE)
                {
***************
*** 1244,1250 ****
        clnt_control(clnt, CLSET_FD_CLOSE, NULL);
  #elif !defined(UNKNOWN_CT_DATA)
        {
!               struct ct_data *ct = (struct ct_data *) hcp->clnt->cl_private;
                ct->ct_closeit = TRUE;
        }
  #endif /* CLSET_FD_CLOSE */
--- 1244,1250 ----
        clnt_control(clnt, CLSET_FD_CLOSE, NULL);
  #elif !defined(UNKNOWN_CT_DATA)
        {
!               struct ct_data *ct = (struct ct_data *) clnt->cl_private;
                ct->ct_closeit = TRUE;
        }
  #endif /* CLSET_FD_CLOSE */