~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/backend/port/win32/socket.c

  • Committer: Bazaar Package Importer
  • Author(s): Ubuntu Archive Backport
  • Date: 2009-11-09 13:46:16 UTC
  • mfrom: (5.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091109134616-ae14l9tr3g7p2t9y
Tags: 8.4.1-1~hardy1
Automated backport upload; no source changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7
7
 *
8
8
 * IDENTIFICATION
9
 
 *        $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.21 2009/01/01 17:23:46 momjian Exp $
 
9
 *        $PostgreSQL: pgsql/src/backend/port/win32/socket.c,v 1.22 2009/06/11 14:49:00 momjian Exp $
10
10
 *
11
11
 *-------------------------------------------------------------------------
12
12
 */
434
434
 
435
435
                        r = WSASend(writefds->fd_array[i], &buf, 1, &sent, 0, NULL, NULL);
436
436
                        if (r == 0)                     /* Completed - means things are fine! */
437
 
                                FD_SET(writefds->fd_array[i], &outwritefds);
 
437
                                FD_SET          (writefds->fd_array[i], &outwritefds);
 
438
 
438
439
                        else
439
440
                        {                                       /* Not completed */
440
441
                                if (WSAGetLastError() != WSAEWOULDBLOCK)
443
444
                                         * Not completed, and not just "would block", so an error
444
445
                                         * occured
445
446
                                         */
446
 
                                        FD_SET(writefds->fd_array[i], &outwritefds);
 
447
                                        FD_SET          (writefds->fd_array[i], &outwritefds);
447
448
                        }
448
449
                }
449
450
                if (outwritefds.fd_count > 0)
530
531
                                        (resEvents.lNetworkEvents & FD_ACCEPT) ||
531
532
                                        (resEvents.lNetworkEvents & FD_CLOSE))
532
533
                                {
533
 
                                        FD_SET(sockets[i], &outreadfds);
 
534
                                        FD_SET          (sockets[i], &outreadfds);
 
535
 
534
536
                                        nummatches++;
535
537
                                }
536
538
                        }
540
542
                                if ((resEvents.lNetworkEvents & FD_WRITE) ||
541
543
                                        (resEvents.lNetworkEvents & FD_CLOSE))
542
544
                                {
543
 
                                        FD_SET(sockets[i], &outwritefds);
 
545
                                        FD_SET          (sockets[i], &outwritefds);
 
546
 
544
547
                                        nummatches++;
545
548
                                }
546
549
                        }