Changeset 293 for trunk/src


Ignore:
Timestamp:
Sep 23, 2010, 6:05:38 AM (14 years ago)
Author:
katerina
Message:

Fix for ticket #221 (client/server problem if client hostname has uppercase chars).

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_unix.c

    r290 r293  
    15591559/* Get the local hostname (FQDN)
    15601560 */
     1561static char * sh_tolower (char * s)
     1562{
     1563  char * ret = s;
     1564  if (s)
     1565    {
     1566      for (; *s; ++s)
     1567        {
     1568          *s = tolower((unsigned char) *s);
     1569        }
     1570    }
     1571  return ret;
     1572}
     1573
     1574
    15611575#include <sys/socket.h>
    15621576
     
    16481662    {
    16491663      sl_strlcpy (sh.host.name, sh_unix_h_name(he1), SH_PATHBUF);
     1664      sh_tolower (sh.host.name);
    16501665    }
    16511666  SH_MUTEX_UNLOCK(mutex_resolv);
     
    16571672           hostname);
    16581673      sl_strlcpy (sh.host.name, hostname,    SH_PATHBUF);
     1674      sh_tolower (sh.host.name);
    16591675    }
    16601676 
     
    17271743    {
    17281744      sl_strlcpy (sh.host.name, sh_unix_h_name(he1), SH_PATHBUF);
     1745      sh_tolower (sh.host.name);
    17291746    }
    17301747  SH_MUTEX_UNLOCK(mutex_resolv);
  • trunk/src/sh_utils.c

    r290 r293  
    796796  SL_RETURN( 0, _("sh_util_sigtype"));
    797797}
     798
    798799
    799800char * sh_util_siggen (char * hexkey, 
Note: See TracChangeset for help on using the changeset viewer.