cleanup code and debug
authorJeremy McNamara <jj@nufone.net>
Thu, 20 May 2004 09:00:04 +0000 (09:00 +0000)
committerJeremy McNamara <jj@nufone.net>
Thu, 20 May 2004 09:00:04 +0000 (09:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3028 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/h323/ast_h323.cpp
channels/h323/ast_h323.h

index 9bb122f..16a63ac 100755 (executable)
@@ -723,14 +723,15 @@ BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel)
        if (h323debug) {
                cout <<  "              -- channelsOpen = " << channelsOpen << endl;
        }
+
        H323_ExternalRTPChannel & external = (H323_ExternalRTPChannel &)channel;
        external.GetRemoteAddress(remoteIpAddress, remotePort); 
 
        if (h323debug) {
-               cout << "               -- remoteIpAddress: " << remoteIpAddress << endl;
-               cout << "               -- remotePort: " << remotePort << endl;
-               cout << "               -- ExternalIpAddress: " << externalIpAddress << endl;
-               cout << "               -- ExternalPort: " << externalPort << endl;
+               if (channel.GetDirection()==H323Channel::IsReceiver) {
+                       cout << "               -- remoteIpAddress: " << remoteIpAddress << endl;
+                       cout << "               -- remotePort: " << remotePort << endl;
+               }
        }
        /* Notify Asterisk of remote RTP information */
        on_start_logical_channel(GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
@@ -784,16 +785,8 @@ BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelA
        PIPSocket::Address remoteIpAddress;
        WORD remotePort;
 
-       if (h323debug) {
-               cout << "       MyH323_ExternalRTPChannel::OnReceivedAckPDU " << endl;
-       }
-
        if (H323_ExternalRTPChannel::OnReceivedAckPDU(param)) {
                H323_ExternalRTPChannel::GetRemoteAddress(remoteIpAddress, remotePort);
-               if (h323debug) {
-                       cout << "               -- remoteIpAddress: " << remoteIpAddress << endl;
-                       cout << "               -- remotePort: " << remotePort << endl;
-               }
                /* Notify Asterisk of remote RTP information */
                on_start_logical_channel(connection.GetCallReference(), (const char *)remoteIpAddress.AsString(), remotePort);
                return TRUE;
@@ -801,7 +794,6 @@ BOOL MyH323_ExternalRTPChannel::OnReceivedAckPDU(const H245_H2250LogicalChannelA
        return FALSE;
 }
 
-
 /** IMPLEMENTATION OF C FUNCTIONS */
 
 /**
index 966edab..4be7f74 100755 (executable)
@@ -285,7 +285,6 @@ class MyH323_ExternalRTPChannel : public H323_ExternalRTPChannel {
 
        /* Destructor */
        ~MyH323_ExternalRTPChannel();
-
        
        BOOL OnReceivedAckPDU(const H245_H2250LogicalChannelAckParameters & param);