diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-21 16:27:57 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-21 16:27:57 +0000 |
commit | 9479f93e1eb44fdba73a9c08005f8e086539ecac (patch) | |
tree | ed504217c7231a340a594d16010ae2865554e707 /channels | |
parent | b264864204da612f7dc8a13e05c5cc960ded1c2d (diff) |
Make debug output more precise. Bug #4345
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5752 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/h323/ast_h323.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp index 4ab477692..371511751 100755 --- a/channels/h323/ast_h323.cpp +++ b/channels/h323/ast_h323.cpp @@ -957,16 +957,13 @@ H323Channel * MyH323Connection::CreateRealTimeLogicalChannel(const H323Capabilit */ BOOL MyH323Connection::OnStartLogicalChannel(H323Channel & channel) { - if (h323debug) { - cout << "\t-- Started logical channel: "; - cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" ")); - cout << (const char *)(channel.GetCapability()).GetFormatName() << endl; - } - /* Increase the count of channels we have open */ channelsOpen++; if (h323debug) { + cout << "\t-- Started logical channel: "; + cout << ((channel.GetDirection()==H323Channel::IsTransmitter)?"sending ":((channel.GetDirection()==H323Channel::IsReceiver)?"receiving ":" ")); + cout << (const char *)(channel.GetCapability()).GetFormatName() << endl; cout << "\t\t-- channelsOpen = " << channelsOpen << endl; } return connectionState != ShuttingDownConnection; @@ -1208,14 +1205,18 @@ int h323_set_capabilities(const char *token, int cap, int dtmfMode) MyH323Connection *conn; if (!h323_end_point_exist()) { - cout << " ERROR: [h323_set_capablity] No Endpoint, this is bad" << endl; + cout << " ERROR: [h323_set_capablities] No Endpoint, this is bad" << endl; + return 1; + } + if (!token || !*token) { + cout << " ERROR: [h323_set_capabilities] Invalid call token specified." << endl; return 1; } PString myToken(token); conn = (MyH323Connection *)endPoint->FindConnectionWithLock(myToken); if (!conn) { - cout << " ERROR: [h323_set_capability] Unable to find connection " << token << endl; + cout << " ERROR: [h323_set_capabilities] Unable to find connection " << token << endl; return 1; } conn->SetCapabilities(cap, dtmfMode); @@ -1274,7 +1275,7 @@ int h323_set_alias(struct oh323_alias *alias) if (strlen(alias->prefix)) { p = prefix = strdup(alias->prefix); while((num = strsep(&p, ",")) != (char *)NULL) { - cout << "== Adding Prefix \"" << num << "\" to endpoint" << endl; + cout << "== Adding Prefix \"" << num << "\" to endpoint" << endl; endPoint->SupportedPrefixes += PString(num); endPoint->SetGateway(); } |