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:
paulc 2006-07-02 20:37:29 +00:00
parent 9dc980c5a9
commit c8c69aa1a1
5 changed files with 13 additions and 13 deletions

View File

@ -153,7 +153,7 @@ IAXTransaction* IAXEngine::addFrame(const SocketAddr& addr, IAXFrame* frame)
if (frame->fullFrame()) {
if (frame->fullFrame()->destCallNo())
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
DDebug(this,DebugAll,"Unsupported incoming transaction Frame(%u,%u). Source call no: %u",
frame->type(),frame->fullFrame()->subclass(),frame->fullFrame()->sourceCallNo());

View File

@ -413,12 +413,12 @@ TokenDict IAXFormat::videoData[] = {
{0, 0}
};
const char* IAXFormat::audioText(u_int8_t audio)
const char* IAXFormat::audioText(u_int32_t audio)
{
return lookup(audio,audioData);
}
const char* IAXFormat::videoText(u_int8_t video)
const char* IAXFormat::videoText(u_int32_t video)
{
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)
{
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,
@ -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)
{
XDebug(DebugAll,"IAXFullFrame::IAXFullFrame(%u,%u) [%p]",
type,subClass,this);
type,subclass,this);
unsigned char header[12];
DataBlock ie;

View File

@ -660,8 +660,8 @@ bool IAXTransaction::enableTrunking(IAXMetaTrunkFrame* trunkFrame)
void IAXTransaction::print()
{
Debug(m_engine,DebugInfo,"Transaction - START PRINT [%p]",this);
Output("Local call no: %u\nRemote call no: %u\nType: %u\nState: %u\nTimestamp: %llu",
localCallNo(),remoteCallNo(),type(),state(),(long unsigned long)timeStamp());
Output("Local call no: %u\nRemote call no: %u\nType: %u\nState: %u\nTimestamp: " FMT64U,
localCallNo(),remoteCallNo(),type(),state(),(u_int64_t)timeStamp());
Output("Queues:\nOutgoing: %u",m_outFrames.count());
ObjList* l;
int i;

View File

@ -518,14 +518,14 @@ public:
* @param audio The desired format
* @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
* @param video The desired format
* @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
@ -692,7 +692,7 @@ public:
* @param value Value to unpack
* @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:
Type m_type; // Frame type
@ -852,7 +852,7 @@ public:
* @return True if the retransmission counter is 0
*/
inline bool timeout() const
{ return !(bool)m_retransCount; }
{ return m_retransCount == 0; }
/**
* Ask the frame if it's time for retransmit
@ -1187,7 +1187,7 @@ public:
* Retrive 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; }
/**

View File

@ -926,7 +926,7 @@ bool YIAXEngine::userreg(IAXTransaction* tr, bool regrel)
// TODO: support number != username
data << "/" << tr->username();
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_port",String(tr->remoteAddr().port()));