~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to connect/ncbi_socket_connector.c

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: ncbi_socket_connector.c,v 6.20 2005/04/20 18:15:59 lavr Exp $
 
1
/*  $Id: ncbi_socket_connector.c,v 6.22 2006/01/27 17:10:54 lavr Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
136
136
            char           addr[MAX_IP_ADDR_LEN];
137
137
 
138
138
            SOCK_GetPeerAddress(xxx->sock, &host, &port, eNH_HostByteOrder);
139
 
            if (SOCK_ntoa(SOCK_htonl(host), addr, sizeof(addr)) != 0)
 
139
            if (SOCK_ntoa(SOCK_HostToNetLong(host), addr, sizeof(addr)) != 0)
140
140
                return eIO_Unknown;
141
141
            xxx->host = strdup(addr);
142
142
            xxx->port = port;
295
295
 size_t         init_size,
296
296
 TSCC_Flags     flags)
297
297
{
298
 
    CONNECTOR       ccc = (SConnector    *) malloc(sizeof(SConnector    ));
299
 
    SSockConnector* xxx = (SSockConnector*) malloc(sizeof(SSockConnector));
 
298
    CONNECTOR       ccc = (SConnector    *) malloc(sizeof(SConnector));
 
299
    SSockConnector* xxx = (SSockConnector*) malloc(sizeof(*xxx));
300
300
 
301
301
    /* parameter check: either sock or host/port, not both */
302
302
    assert((!sock && host && port) || (sock && !host && !port));
374
374
/*
375
375
 * --------------------------------------------------------------------------
376
376
 * $Log: ncbi_socket_connector.c,v $
 
377
 * Revision 6.22  2006/01/27 17:10:54  lavr
 
378
 * Replace obsolete call names with current ones
 
379
 *
 
380
 * Revision 6.21  2006/01/11 20:21:08  lavr
 
381
 * Uniform creation/fill-up of connector structures
 
382
 *
377
383
 * Revision 6.20  2005/04/20 18:15:59  lavr
378
384
 * +<assert.h>
379
385
 *