Fixed bugs exposed by VC++
git-svn-id: http://yate.null.ro/svn/yate/trunk@921 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
9dc980c5a9
commit
c8c69aa1a1
|
@ -153,7 +153,7 @@ IAXTransaction* IAXEngine::addFrame(const SocketAddr& addr, IAXFrame* frame)
|
||||||
if (frame->fullFrame()) {
|
if (frame->fullFrame()) {
|
||||||
if (frame->fullFrame()->destCallNo())
|
if (frame->fullFrame()->destCallNo())
|
||||||
XDebug(this,DebugAll,"Unmatched Frame(%u,%u) for (%u,%u)",
|
XDebug(this,DebugAll,"Unmatched Frame(%u,%u) for (%u,%u)",
|
||||||
frame->type(),frame->subclass(),frame->fullFrame()->destCallNo(),frame->fullFrame()->sourceCallNo());
|
frame->type(),frame->fullFrame()->subclass(),frame->fullFrame()->destCallNo(),frame->fullFrame()->sourceCallNo());
|
||||||
else
|
else
|
||||||
DDebug(this,DebugAll,"Unsupported incoming transaction Frame(%u,%u). Source call no: %u",
|
DDebug(this,DebugAll,"Unsupported incoming transaction Frame(%u,%u). Source call no: %u",
|
||||||
frame->type(),frame->fullFrame()->subclass(),frame->fullFrame()->sourceCallNo());
|
frame->type(),frame->fullFrame()->subclass(),frame->fullFrame()->sourceCallNo());
|
||||||
|
|
|
@ -413,12 +413,12 @@ TokenDict IAXFormat::videoData[] = {
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* IAXFormat::audioText(u_int8_t audio)
|
const char* IAXFormat::audioText(u_int32_t audio)
|
||||||
{
|
{
|
||||||
return lookup(audio,audioData);
|
return lookup(audio,audioData);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* IAXFormat::videoText(u_int8_t video)
|
const char* IAXFormat::videoText(u_int32_t video)
|
||||||
{
|
{
|
||||||
return lookup(video,videoData);
|
return lookup(video,videoData);
|
||||||
}
|
}
|
||||||
|
@ -580,7 +580,7 @@ IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_i
|
||||||
m_dCallNo(dCallNo), m_oSeqNo(oSeqNo), m_iSeqNo(iSeqNo), m_subclass(subclass)
|
m_dCallNo(dCallNo), m_oSeqNo(oSeqNo), m_iSeqNo(iSeqNo), m_subclass(subclass)
|
||||||
{
|
{
|
||||||
XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]",
|
XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]",
|
||||||
type,subClass,this);
|
type,subclass,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo,
|
IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo,
|
||||||
|
@ -591,7 +591,7 @@ IAXFullFrame::IAXFullFrame(Type type, u_int32_t subclass, u_int16_t sCallNo, u_i
|
||||||
m_dCallNo(dCallNo), m_oSeqNo(oSeqNo), m_iSeqNo(iSeqNo), m_subclass(subclass)
|
m_dCallNo(dCallNo), m_oSeqNo(oSeqNo), m_iSeqNo(iSeqNo), m_subclass(subclass)
|
||||||
{
|
{
|
||||||
XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]",
|
XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]",
|
||||||
type,subClass,this);
|
type,subclass,this);
|
||||||
|
|
||||||
unsigned char header[12];
|
unsigned char header[12];
|
||||||
DataBlock ie;
|
DataBlock ie;
|
||||||
|
|
|
@ -660,8 +660,8 @@ bool IAXTransaction::enableTrunking(IAXMetaTrunkFrame* trunkFrame)
|
||||||
void IAXTransaction::print()
|
void IAXTransaction::print()
|
||||||
{
|
{
|
||||||
Debug(m_engine,DebugInfo,"Transaction - START PRINT [%p]",this);
|
Debug(m_engine,DebugInfo,"Transaction - START PRINT [%p]",this);
|
||||||
Output("Local call no: %u\nRemote call no: %u\nType: %u\nState: %u\nTimestamp: %llu",
|
Output("Local call no: %u\nRemote call no: %u\nType: %u\nState: %u\nTimestamp: " FMT64U,
|
||||||
localCallNo(),remoteCallNo(),type(),state(),(long unsigned long)timeStamp());
|
localCallNo(),remoteCallNo(),type(),state(),(u_int64_t)timeStamp());
|
||||||
Output("Queues:\nOutgoing: %u",m_outFrames.count());
|
Output("Queues:\nOutgoing: %u",m_outFrames.count());
|
||||||
ObjList* l;
|
ObjList* l;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -518,14 +518,14 @@ public:
|
||||||
* @param audio The desired format
|
* @param audio The desired format
|
||||||
* @return A pointer to the text associated with the format or 0 if the format doesn't exist
|
* @return A pointer to the text associated with the format or 0 if the format doesn't exist
|
||||||
*/
|
*/
|
||||||
static const char* audioText(u_int8_t audio);
|
static const char* audioText(u_int32_t audio);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the text associated with a video format
|
* Get the text associated with a video format
|
||||||
* @param video The desired format
|
* @param video The desired format
|
||||||
* @return A pointer to the text associated with the format or 0 if the format doesn't exist
|
* @return A pointer to the text associated with the format or 0 if the format doesn't exist
|
||||||
*/
|
*/
|
||||||
static const char* videoText(u_int8_t video);
|
static const char* videoText(u_int32_t video);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Keep the texts associated with the audio formats
|
* Keep the texts associated with the audio formats
|
||||||
|
@ -692,7 +692,7 @@ public:
|
||||||
* @param value Value to unpack
|
* @param value Value to unpack
|
||||||
* @return The unpacked subclass value
|
* @return The unpacked subclass value
|
||||||
*/
|
*/
|
||||||
static u_int32_t IAXFrame::unpackSubclass(u_int8_t value);
|
static u_int32_t unpackSubclass(u_int8_t value);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Type m_type; // Frame type
|
Type m_type; // Frame type
|
||||||
|
@ -852,7 +852,7 @@ public:
|
||||||
* @return True if the retransmission counter is 0
|
* @return True if the retransmission counter is 0
|
||||||
*/
|
*/
|
||||||
inline bool timeout() const
|
inline bool timeout() const
|
||||||
{ return !(bool)m_retransCount; }
|
{ return m_retransCount == 0; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ask the frame if it's time for retransmit
|
* Ask the frame if it's time for retransmit
|
||||||
|
@ -1187,7 +1187,7 @@ public:
|
||||||
* Retrive the expiring time for a register/unregister transaction
|
* Retrive the expiring time for a register/unregister transaction
|
||||||
* @return The expiring time for a register/unregister transaction
|
* @return The expiring time for a register/unregister transaction
|
||||||
*/
|
*/
|
||||||
inline u_int16_t expire() const
|
inline u_int32_t expire() const
|
||||||
{ return m_expire; }
|
{ return m_expire; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -926,7 +926,7 @@ bool YIAXEngine::userreg(IAXTransaction* tr, bool regrel)
|
||||||
// TODO: support number != username
|
// TODO: support number != username
|
||||||
data << "/" << tr->username();
|
data << "/" << tr->username();
|
||||||
msg.addParam("data",data);
|
msg.addParam("data",data);
|
||||||
msg.addParam("expires",String(tr->expire()));
|
msg.addParam("expires",String((long)tr->expire()));
|
||||||
}
|
}
|
||||||
msg.addParam("ip_host",tr->remoteAddr().host());
|
msg.addParam("ip_host",tr->remoteAddr().host());
|
||||||
msg.addParam("ip_port",String(tr->remoteAddr().port()));
|
msg.addParam("ip_port",String(tr->remoteAddr().port()));
|
||||||
|
|
Loading…
Reference in New Issue