Fixed warnings and a few minor bugs when compiling on a different architecture.
git-svn-id: http://voip.null.ro/svn/yate@2724 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
ae477f1184
commit
eb2a9cd5e0
|
@ -2736,11 +2736,10 @@ bool QtClient::getProperty(QObject* obj, const char* name, String& value)
|
|||
name,value.c_str(),YQT_OBJECT_NAME(obj));
|
||||
return true;
|
||||
}
|
||||
const char* err = (var.type() == QVariant::Invalid) ? "no such property" :
|
||||
"unsupported type";
|
||||
DDebug(ClientDriver::self(),DebugNote,
|
||||
"Failed to get property '%s' (type=%s) for object '%s': %s",
|
||||
name,var.typeName(),YQT_OBJECT_NAME(obj),err);
|
||||
name,var.typeName(),YQT_OBJECT_NAME(obj),
|
||||
((var.type() == QVariant::Invalid) ? "no such property" : "unsupported type"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2635,8 +2635,10 @@ void ClientChannel::checkSilence()
|
|||
return;
|
||||
m_silence = !(getConsumer() && getConsumer()->getConnSource() &&
|
||||
DataNode::invalidStamp() != getConsumer()->getConnSource()->timeStamp());
|
||||
#ifdef DEBUG
|
||||
if (!m_silence)
|
||||
DDebug(this,DebugInfo,"Got audio data [%p]",this);
|
||||
Debug(this,DebugInfo,"Got audio data [%p]",this);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Open/close media
|
||||
|
|
|
@ -45,7 +45,8 @@ DataBlock::DataBlock()
|
|||
}
|
||||
|
||||
DataBlock::DataBlock(const DataBlock& value)
|
||||
: m_data(0), m_length(0)
|
||||
: GenObject(),
|
||||
m_data(0), m_length(0)
|
||||
{
|
||||
assign(value.data(),value.length());
|
||||
}
|
||||
|
@ -272,7 +273,7 @@ bool DataBlock::convert(const DataBlock& src, const String& sFormat,
|
|||
}
|
||||
|
||||
// Decode a single nibble, return -1 on error
|
||||
inline char hexDecode(char c)
|
||||
inline signed char hexDecode(char c)
|
||||
{
|
||||
if (('0' <= c) && (c <= '9'))
|
||||
return c - '0';
|
||||
|
@ -319,8 +320,8 @@ bool DataBlock::unHexify(const char* data, unsigned int len, char sep)
|
|||
char* buf = (char*)::malloc(n);
|
||||
unsigned int iBuf = 0;
|
||||
for (unsigned int i = 0; i < len; i += (sep ? 3 : 2)) {
|
||||
char c1 = hexDecode(data[i]);
|
||||
char c2 = hexDecode(data[i+1]);
|
||||
signed char c1 = hexDecode(data[i]);
|
||||
signed char c2 = hexDecode(data[i+1]);
|
||||
if (c1 == -1 || c2 == -1 || (sep && (iBuf != n - 1) && (sep != data[i+2])))
|
||||
break;
|
||||
buf[iBuf++] = (c1 << 4) | c2;
|
||||
|
|
|
@ -609,7 +609,7 @@ bool File::setBlocking(bool block)
|
|||
#else
|
||||
unsigned long flags = 1;
|
||||
flags = ::fcntl(m_handle,F_GETFL);
|
||||
if (flags < 0) {
|
||||
if ((signed long)flags < 0) {
|
||||
copyError();
|
||||
return false;
|
||||
}
|
||||
|
@ -1577,7 +1577,7 @@ bool Socket::setBlocking(bool block)
|
|||
return checkError(::ioctlsocket(m_handle,FIONBIO,(unsigned long *) &flags));
|
||||
#else
|
||||
flags = ::fcntl(m_handle,F_GETFL);
|
||||
if (flags < 0) {
|
||||
if ((signed long)flags < 0) {
|
||||
copyError();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -203,7 +203,8 @@ String::String(const char* value, int len)
|
|||
}
|
||||
|
||||
String::String(const String& value)
|
||||
: m_string(0), m_length(0), m_hash(INIT_HASH), m_matches(0)
|
||||
: GenObject(),
|
||||
m_string(0), m_length(0), m_hash(INIT_HASH), m_matches(0)
|
||||
{
|
||||
XDebug(DebugAll,"String::String(%p) [%p]",&value,this);
|
||||
if (!value.null()) {
|
||||
|
|
|
@ -654,9 +654,11 @@ JBEvent* JBStream::getEvent(u_int64_t time)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (m_lastEvent)
|
||||
DDebug(m_engine,DebugAll,"Stream. Raising event (%p,%s) [%p]",
|
||||
Debug(m_engine,DebugAll,"Stream. Raising event (%p,%s) [%p]",
|
||||
m_lastEvent,m_lastEvent->name(),this);
|
||||
#endif
|
||||
return m_lastEvent;
|
||||
}
|
||||
|
||||
|
|
|
@ -657,20 +657,22 @@ unsigned int XMPPUtils::decodeDateTimeSec(const String& time, unsigned int* frac
|
|||
hh = (unsigned int)(*list)[0]->toString().toInteger(-1,10);
|
||||
mm = (unsigned int)(*list)[1]->toString().toInteger(-1,10);
|
||||
ss = (unsigned int)(*list)[2]->toString().toInteger(-1,10);
|
||||
valid = (hh >= 0 && hh <= 23 && mm >= 0 && mm <= 59 && ss >= 0 && ss <= 59) ||
|
||||
valid = (hh <= 23 && mm <= 59 && ss <= 59) ||
|
||||
(hh == 24 && mm == 0 && ss == 0);
|
||||
}
|
||||
TelEngine::destruct(list);
|
||||
if (valid)
|
||||
DDebug(DebugAll,
|
||||
"XMPPUtils::decodeDateTimeSec() decoded hour=%u minute=%u sec=%u from '%s'",
|
||||
hh,mm,ss,time.c_str());
|
||||
else {
|
||||
if (!valid) {
|
||||
DDebug(DebugNote,
|
||||
"XMPPUtils::decodeDateTimeSec() incorrect time=%s in '%s'",
|
||||
t.c_str(),time.c_str());
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
Debug(DebugAll,
|
||||
"XMPPUtils::decodeDateTimeSec() decoded hour=%u minute=%u sec=%u from '%s'",
|
||||
hh,mm,ss,time.c_str());
|
||||
#endif
|
||||
// Get the rest
|
||||
unsigned int parsed = date.length() + t.length() + 1;
|
||||
unsigned int len = time.length() - parsed;
|
||||
|
@ -742,10 +744,12 @@ unsigned int XMPPUtils::decodeDateTimeSec(const String& time, unsigned int* frac
|
|||
break;
|
||||
}
|
||||
ret = Time::toEpoch(year,month,day,hh,mm,ss,offsetSec);
|
||||
#ifdef DEBUG
|
||||
if (ret == (unsigned int)-1)
|
||||
DDebug(DebugNote,
|
||||
Debug(DebugNote,
|
||||
"XMPPUtils::decodeDateTimeSec() failed to convert '%s'",
|
||||
time.c_str());
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,8 @@ public:
|
|||
* Copy constructor
|
||||
*/
|
||||
inline JGRtpMedia(const JGRtpMedia& src)
|
||||
: m_params(src.m_params)
|
||||
: GenObject(),
|
||||
m_params(src.m_params)
|
||||
{ set(src.m_id,src.m_name,src.m_clockrate,src.m_channels,src.m_synonym); }
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,7 +54,8 @@ RTPSecure::RTPSecure(const String& suite)
|
|||
}
|
||||
|
||||
RTPSecure::RTPSecure(const RTPSecure& other)
|
||||
: m_owner(0), m_rtpCipher(0),
|
||||
: GenObject(),
|
||||
m_owner(0), m_rtpCipher(0),
|
||||
m_rtpAuthLen(other.m_rtpAuthLen), m_rtpEncrypted(other.m_rtpEncrypted)
|
||||
{
|
||||
DDebug(DebugAll,"RTPSecure::~RTPSecure(%p) [%p]",&other,this);
|
||||
|
|
|
@ -290,11 +290,15 @@ bool RTPTransport::localAddr(SocketAddr& addr, bool rtcp)
|
|||
m_localAddr = addr;
|
||||
return true;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DDebug(DebugMild,"RTCP Socket failed with code %d",m_rtcpSock.error());
|
||||
Debug(DebugMild,"RTCP Socket failed with code %d",m_rtcpSock.error());
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DDebug(DebugMild,"RTP Socket failed with code %d",m_rtpSock.error());
|
||||
Debug(DebugMild,"RTP Socket failed with code %d",m_rtpSock.error());
|
||||
#endif
|
||||
m_rtpSock.terminate();
|
||||
m_rtcpSock.terminate();
|
||||
return false;
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
using namespace TelEngine;
|
||||
|
||||
SIPMessage::SIPMessage(const SIPMessage& original)
|
||||
: version(original.version), method(original.method), uri(original.uri),
|
||||
: RefObject(),
|
||||
version(original.version), method(original.method), uri(original.uri),
|
||||
code(original.code), reason(original.reason),
|
||||
body(0), m_ep(0),
|
||||
m_valid(original.isValid()), m_answer(original.isAnswer()),
|
||||
|
|
|
@ -61,7 +61,8 @@ public:
|
|||
: m_f1(f1), m_f2(f2), m_mod(modulated), m_data(0)
|
||||
{ }
|
||||
inline ToneData(const ToneData& original)
|
||||
: m_f1(original.f1()), m_f2(original.f2()),
|
||||
: GenObject(),
|
||||
m_f1(original.f1()), m_f2(original.f2()),
|
||||
m_mod(original.modulated()), m_data(0)
|
||||
{ }
|
||||
virtual ~ToneData();
|
||||
|
|
|
@ -3584,10 +3584,12 @@ void YJGTransfer::run()
|
|||
YJGConnection* conn = static_cast<YJGConnection*>(plugin.Driver::find(m_transferorID));
|
||||
if (conn)
|
||||
conn->transferTerminated(!error,error);
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DDebug(&plugin,DebugInfo,
|
||||
Debug(&plugin,DebugInfo,
|
||||
"%s thread transfer terminated trans=%s error=%s [%p]",
|
||||
name(),m_transferredID.c_str(),error.c_str(),this);
|
||||
#endif
|
||||
plugin.unlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -2164,12 +2164,14 @@ void YateSIPRefer::run()
|
|||
RefPointer<Channel> chan = m_transferredDrv->find(m_transferredID);
|
||||
m_transferredDrv->unlock();
|
||||
if (!(ok && chan)) {
|
||||
#ifdef DEBUG
|
||||
if (ok)
|
||||
DDebug(&plugin,DebugAll,"%s(%s). Connection vanished while routing! [%p]",
|
||||
Debug(&plugin,DebugAll,"%s(%s). Connection vanished while routing! [%p]",
|
||||
name(),m_transferorID.c_str(),this);
|
||||
else
|
||||
DDebug(&plugin,DebugAll,"%s(%s). 'call.route' failed [%p]",
|
||||
Debug(&plugin,DebugAll,"%s(%s). 'call.route' failed [%p]",
|
||||
name(),m_transferorID.c_str(),this);
|
||||
#endif
|
||||
m_rspCode = m_notifyCode = (ok ? 487 : 481);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -838,9 +838,11 @@ bool YStunUtils::sendMessage(Socket* socket, const YStunMessage* msg,
|
|||
if (!socket->canRetry())
|
||||
Debug(&iplugin,DebugWarn,"Socket write error: '%s' (%d). [%p]",
|
||||
::strerror(socket->error()),socket->error(),sender);
|
||||
#ifdef DEBUG
|
||||
else
|
||||
DDebug(&iplugin,DebugMild,"Socket temporary unavailable: '%s' (%d). [%p]",
|
||||
Debug(&iplugin,DebugMild,"Socket temporary unavailable: '%s' (%d). [%p]",
|
||||
::strerror(socket->error()),socket->error(),sender);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -888,6 +888,7 @@ public:
|
|||
* @param value Original RefPointer
|
||||
*/
|
||||
inline RefPointer(const RefPointer<Obj>& value)
|
||||
: RefPointerBase()
|
||||
{ assign(value); }
|
||||
|
||||
/**
|
||||
|
@ -4058,7 +4059,8 @@ public:
|
|||
* @param value Address to copy
|
||||
*/
|
||||
inline SocketAddr(const SocketAddr& value)
|
||||
: m_address(0), m_length(0)
|
||||
: GenObject(),
|
||||
m_address(0), m_length(0)
|
||||
{ assign(value.address(),value.length()); }
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue