(file) Return to HTTPAcceptor.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/HTTPAcceptor.cpp between version 1.132 and 1.138

version 1.132, 2012/07/03 11:53:22 version 1.138, 2015/06/10 12:36:01
Line 79 
Line 79 
                 reinterpret_cast<struct sockaddr*>(new struct sockaddr_un);                 reinterpret_cast<struct sockaddr*>(new struct sockaddr_un);
             address_size = sizeof(struct sockaddr_un);             address_size = sizeof(struct sockaddr_un);
 #else #else
             PEGASUS_ASSERT(false);              PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
 #endif #endif
         }         }
 #ifdef PEGASUS_ENABLE_IPV6 #ifdef PEGASUS_ENABLE_IPV6
Line 98 
Line 98 
         }         }
         else         else
         {         {
             PEGASUS_ASSERT(false);              PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
     }     }
     }     }
  
Line 215 
Line 215 
     {     {
         case SOCKET_MESSAGE:         case SOCKET_MESSAGE:
         {         {
             SocketMessage* socketMessage = (SocketMessage*)message;  
   
             // If this is a connection request:             // If this is a connection request:
             PEGASUS_ASSERT(socketMessage->socket == _rep->socket);              PEGASUS_ASSERT(((SocketMessage*)message)->socket == _rep->socket);
  
             PEGASUS_ASSERT(socketMessage->events & SocketMessage::READ);              PEGASUS_ASSERT(
                   ((SocketMessage*)message)->events & SocketMessage::READ);
  
             _acceptConnection();             _acceptConnection();
  
Line 252 
Line 251 
        }        }
  
        default:        default:
            PEGASUS_ASSERT(false);             PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
            break;            break;
     }     }
  
Line 330 
Line 329 
         strcpy(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path,         strcpy(reinterpret_cast<struct sockaddr_un*>(_rep->address)->sun_path,
             PEGASUS_LOCAL_DOMAIN_SOCKET_PATH);             PEGASUS_LOCAL_DOMAIN_SOCKET_PATH);
 #else #else
         PEGASUS_ASSERT(false);          PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
 #endif #endif
     }     }
 #ifdef PEGASUS_ENABLE_IPV6 #ifdef PEGASUS_ENABLE_IPV6
Line 345 
Line 344 
             memset(&in6addr, 0, sizeof(sockaddr_in6));             memset(&in6addr, 0, sizeof(sockaddr_in6));
             if(_listenAddress ->isHostAddLinkLocal())             if(_listenAddress ->isHostAddLinkLocal())
             {             {
                 ::inet_pton(AF_INET6,                  HostAddress::convertTextToBinary(AF_INET6,
                 (const char*)ip,                 (const char*)ip,
                 &in6addr.sin6_addr);                 &in6addr.sin6_addr);
                 reinterpret_cast<struct sockaddr_in6*>(                 reinterpret_cast<struct sockaddr_in6*>(
Line 356 
Line 355 
             }             }
             else             else
             {             {
                 ::inet_pton(AF_INET6,                  HostAddress::convertTextToBinary(AF_INET6,
                 (const char*)ip,                 (const char*)ip,
                 &in6addr.sin6_addr);                 &in6addr.sin6_addr);
                 reinterpret_cast<struct sockaddr_in6*>(                 reinterpret_cast<struct sockaddr_in6*>(
Line 381 
Line 380 
             String hostAdd = _listenAddress->getHost();             String hostAdd = _listenAddress->getHost();
             CString ip = hostAdd.getCString();             CString ip = hostAdd.getCString();
             struct sockaddr_in addrs;             struct sockaddr_in addrs;
             ::inet_pton(              HostAddress::convertTextToBinary(
                 AF_INET,                 AF_INET,
                 (const char*)ip,                 (const char*)ip,
                 &addrs.sin_addr);                 &addrs.sin_addr);
Line 400 
Line 399 
     }     }
     else     else
     {     {
         PEGASUS_ASSERT(false);          PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
     }     }
  
     // Create socket:     // Create socket:
Line 421 
Line 420 
     }     }
     else     else
     {     {
         PEGASUS_ASSERT(false);          PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
     }     }
  
     if (_rep->socket < 0)     if (_rep->socket < 0)
Line 553 
Line 552 
  
     if (-1 == ( _entry_index = _monitor->solicitSocketMessages(     if (-1 == ( _entry_index = _monitor->solicitSocketMessages(
             _rep->socket,             _rep->socket,
             SocketMessage::READ | SocketMessage::EXCEPTION,  
             getQueueId(),             getQueueId(),
             MonitorEntry::TYPE_ACCEPTOR)))             MonitorEntry::TYPE_ACCEPTOR)))
     {     {
Line 592 
Line 590 
                     reinterpret_cast<struct sockaddr_un*>                     reinterpret_cast<struct sockaddr_un*>
                         (_rep->address)->sun_path);                         (_rep->address)->sun_path);
 #else #else
             PEGASUS_ASSERT(false);              PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
 #endif #endif
         }         }
     }     }
Line 642 
Line 640 
                     reinterpret_cast<struct sockaddr_un*>(                     reinterpret_cast<struct sockaddr_un*>(
                         _rep->address)->sun_path);                         _rep->address)->sun_path);
 #else #else
             PEGASUS_ASSERT(false);              PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
 #endif #endif
         }         }
         // open the socket         // open the socket
Line 676 
Line 674 
     return count;     return count;
 } }
  
   /**
       getListenAddress - Returns bind address
   */
   String HTTPAcceptor::getListenAddress() const
   {
       return _listenAddress ? _listenAddress->getHost() : String();
   }
  
 /** /**
     getPortNumber - returns the port number used for the connection     getPortNumber - returns the port number used for the connection
Line 707 
Line 712 
                     reinterpret_cast<struct sockaddr_un*>                     reinterpret_cast<struct sockaddr_un*>
                     (_rep->address)->sun_path);                     (_rep->address)->sun_path);
 #else #else
             PEGASUS_ASSERT(false);              PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
 #endif #endif
         }         }
  
Line 765 
Line 770 
             reinterpret_cast<struct sockaddr*>(new struct sockaddr_un);             reinterpret_cast<struct sockaddr*>(new struct sockaddr_un);
         address_size = sizeof(struct sockaddr_un);         address_size = sizeof(struct sockaddr_un);
 #else #else
         PEGASUS_ASSERT(false);          PEGASUS_UNREACHABLE(PEGASUS_ASSERT(false);)
 #endif #endif
     }     }
     else     else
Line 851 
Line 856 
     {     {
 #ifdef PEGASUS_ENABLE_IPV6 #ifdef PEGASUS_ENABLE_IPV6
         char ipBuffer[PEGASUS_INET6_ADDRSTR_LEN];         char ipBuffer[PEGASUS_INET6_ADDRSTR_LEN];
         int rc;          if (System::getNameInfo(accept_address,
         if ((rc = System::getNameInfo(accept_address,  
                 address_size,                 address_size,
                 ipBuffer,                 ipBuffer,
                 PEGASUS_INET6_ADDRSTR_LEN,                 PEGASUS_INET6_ADDRSTR_LEN,
                 0,                 0,
                 0,                 0,
                 NI_NUMERICHOST)))                  NI_NUMERICHOST))
         {         {
             PEG_TRACE((  
                 TRC_DISCARDED_DATA,  
                 Tracer::LEVEL1,  
                 "HTTPAcceptor: getnameinfo() failed.  rc: %d",  
                 rc));  
             delete accept_address;             delete accept_address;
             return;             return;
         }         }
Line 959 
Line 958 
  
     if (-1 ==  (index = _monitor->solicitSocketMessages(     if (-1 ==  (index = _monitor->solicitSocketMessages(
             connection->getSocket(),             connection->getSocket(),
             SocketMessage::READ | SocketMessage::EXCEPTION,  
             connection->getQueueId(), MonitorEntry::TYPE_CONNECTION)) )             connection->getQueueId(), MonitorEntry::TYPE_CONNECTION)) )
     {     {
         PEG_TRACE_CSTRING(TRC_DISCARDED_DATA, Tracer::LEVEL1,         PEG_TRACE_CSTRING(TRC_DISCARDED_DATA, Tracer::LEVEL1,


Legend:
Removed from v.1.132  
changed lines
  Added in v.1.138

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2