~ubuntu-branches/ubuntu/trusty/librep/trusty

« back to all changes in this revision

Viewing changes to src/sockets.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2007-01-25 11:09:23 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070125110923-2owlh6jsptg68pn5
Tags: 0.17+svn20070119-2ubuntu1
* Re-sync with Debian.  Following change kept:
  - Still building with --with-stack-direction=-1 for ppc/ia64.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* sockets.c -- BSD sockets plugin
2
2
 
3
 
   $Id: sockets.c,v 1.12 2002/03/31 03:43:54 jsh Exp $
 
3
   $Id: sockets.c 2895 2005-01-20 06:44:59Z jsh $
4
4
 
5
5
   Copyright (C) 2000 John Harper <john@dcs.warwick.ac.uk>
6
6
 
451
451
    struct sockaddr_in in_name;
452
452
    struct sockaddr_un un_name;
453
453
    void *addr;
454
 
    size_t length;
 
454
    socklen_t length;
455
455
    int new;
456
456
 
457
457
    rep_DECLARE (1, sock, ACTIVE_SOCKET_P (sock));
491
491
        if (s->namespace == PF_INET)
492
492
        {
493
493
            struct sockaddr_in name;
494
 
            size_t length = sizeof (name);
 
494
            socklen_t length = sizeof (name);
495
495
            if (getsockname (s->sock, (struct sockaddr *) &name, &length) == 0)
496
496
            {
497
497
                if (name.sin_addr.s_addr == INADDR_ANY)
532
532
        if (s->namespace == PF_INET)
533
533
        {
534
534
            struct sockaddr_in name;
535
 
            size_t length = sizeof (name);
 
535
            socklen_t length = sizeof (name);
536
536
            if (getpeername (s->sock, (struct sockaddr *) &name, &length) == 0)
537
537
            {
538
538
                char *addr = inet_ntoa (name.sin_addr);