warnings cleanup.

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@72 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2007-05-21 19:23:01 +00:00
parent 23d2d673c1
commit 1f16b98ca8
5 changed files with 76 additions and 45 deletions

View File

@ -548,14 +548,14 @@ L3INT Q931GetCallState(Q931_TrunkInfo *pTrunk, L3INT iCRV)
callindex call index.
iTimer timer id
*****************************************************************************/
L3INT Q931StartTimer(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3INT iTimerID)
L3INT Q931StartTimer(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3USHORT iTimerID)
{
pTrunk->call[callIndex].Timer = Q931GetTime();
pTrunk->call[callIndex].TimerID = iTimerID;
return 0;
}
L3INT Q931StopTimer(Q931_TrunkInfo *pTrunk, L3INT callindex, L3INT iTimerID)
L3INT Q931StopTimer(Q931_TrunkInfo *pTrunk, L3INT callindex, L3USHORT iTimerID)
{
if(pTrunk->call[callindex].TimerID == iTimerID)
pTrunk->call[callindex].TimerID = 0;
@ -571,7 +571,7 @@ L3INT Q931SetState(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3INT iState)
L3ULONG Q931GetTime()
{
L3ULONG tNow;
L3ULONG tNow = 0;
static L3ULONG tLast={0};
if(Q931GetTimeProc != NULL)
{

View File

@ -347,11 +347,15 @@ L3INT Q931ProcSetupNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom)
return ret;
}
#if 0
/* TODO: Unreachable code??? */
/* Set state U6 */
Q931SetState(pTrunk, callIndex, Q931_U6);
Q931StartTimer(pTrunk, callIndex, 303);
}
#endif
}
return rc;
}

View File

@ -428,11 +428,13 @@ L3INT Q931ProcSetupTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom)
Q931Disconnect(pTrunk, iFrom, pMes->CRV, 81);
return ret;
}
#if 0
/* TODO: Unreachable code??? */
/* Set state U6 */
Q931SetState(pTrunk, callIndex, Q931_U6);
Q931StartTimer(pTrunk, callIndex, 303);
#endif
}
return rc;

View File

@ -234,10 +234,11 @@ L3UCHAR * Q931GetIEBuf(L3UCHAR *pm)
case Q931mes_CONGESTION_CONTROL :
trampoline(Q931mes_CongestionControl);
break;
// case Q931mes_FACILITY :
// trampoline(Q931mes_Facility);
// break;
#if 0
case Q931mes_FACILITY :
trampoline(Q931mes_Facility);
break;
#endif
case Q931mes_INFORMATION :
trampoline(Q931mes_Information);
@ -247,9 +248,11 @@ L3UCHAR * Q931GetIEBuf(L3UCHAR *pm)
trampoline(Q931mes_Notify);
break;
// case Q931mes_REGISTER :
// trampoline(Q931mes_Register);
// break;
#if 0
case Q931mes_REGISTER :
trampoline(Q931mes_Register);
break;
#endif
case Q931mes_STATUS :
trampoline(Q931mes_Status);
@ -301,7 +304,7 @@ ie Q931AppendIE( L3UCHAR *pm, L3UCHAR *pi)
L3UCHAR *pBuf = Q931GetIEBuf(pm);
L3INT Off = pMes->Size - (pBuf - pm);
IE = Off | 0x8000;
IE = (ie)(Off | 0x8000);
memcpy(&pm[pMes->Size], pi, iISize);
@ -577,7 +580,9 @@ L3INT Q931InitIELLComp(Q931ie_LLComp * pIE)
pIE->Layer3Ident = 0; /* Layer 3 ident */
pIE->OptL3Info = 0; /* Optional layer 3 protocol info. */
pIE->ModeL3 = 0; /* Mode of operation */
// pIE->ModeX25op = 0; /* Mode of operation X.25 */
#if 0
pIE->ModeX25op = 0; /* Mode of operation X.25 */
#endif
pIE->DefPackSize = 0; /* Default packet size */
pIE->PackWinSize = 0; /* Packet window size */
pIE->AddL3Info = 0; /* Additional Layer 3 protocol info */
@ -595,20 +600,40 @@ L3INT Q931InitIEHLComp(Q931ie_HLComp * pIE)
L3INT Q931ProcUnknownMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom)
{
/* TODO: Unhandled paramaters */
(void)pTrunk;
(void)b;
(void)iFrom;
return 0;
}
L3INT Q931ProcUnexpectedMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom)
{
/* TODO: Unhandled paramaters */
(void)pTrunk;
(void)b;
(void)iFrom;
return 0;
}
L3INT Q931Disconnect(Q931_TrunkInfo *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause)
{
/* TODO: Unhandled paramaters */
(void)pTrunk;
(void)iTo;
(void)iCRV;
(void)iCause;
return 0;
}
L3INT Q931ReleaseComplete(Q931_TrunkInfo *pTrunk, L3INT iTo)
{
return 0;
/* TODO: Unhandled paramaters */
(void)pTrunk;
(void)iTo;
return 0;
}

View File

@ -1348,7 +1348,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
}Q931mes_Header;
/*****************************************************************************
@ -1364,7 +1364,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Shift;
ie MoreData;
@ -1424,7 +1424,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie BearerCap; /* Bearer Capability */
ie ChanID; /* Channel Identification */
ie ProgInd; /* Progress Indicator */
@ -1445,7 +1445,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie BearerCap; /* Bearer Capability */
ie ChanID; /* Channel Identification */
ie ProgInd; /* Progress Indicator */
@ -1465,7 +1465,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie BearerCap; /* Bearer Capability */
ie ChanID; /* Channel Identification */
ie ProgInd; /* Progress Indicator */
@ -1488,7 +1488,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Display; /* Display */
ie Signal; /* Signal */
L3UCHAR buf[1]; /* Dynamic buffer */
@ -1505,7 +1505,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Cause; /* Cause */
ie ProgInd; /* Progress Indicator */
ie Display; /* Display */
@ -1527,7 +1527,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie SendComplete; /* Sending Complete */
ie Display; /* Display */
ie KeypadFac; /* Keypad facility */
@ -1550,7 +1550,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie BearerCap; /* Bearer Capability */
ie NotifInd; /* Notification Indicator */
ie Display; /* Display */
@ -1568,7 +1568,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie BearerCap; /* Bearer Capability */
ie Cause; /* Cause */
ie ProgInd; /* Progress Indicator */
@ -1588,7 +1588,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Cause; /* Cause */
ie Display; /* Display */
ie Signal; /* Signal */
@ -1609,7 +1609,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Cause; /* Cause */
ie Display; /* Display */
ie Signal; /* Signal */
@ -1629,7 +1629,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie CallID; /* Call Identity */
L3UCHAR buf[1];
}Q931mes_Resume;
@ -1645,7 +1645,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie ChanID; /* Channel ID */
ie Display; /* Display */
L3UCHAR buf[1]; /* Dynamic buffer */
@ -1662,7 +1662,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Cause; /* Cause */
ie Display; /* Display */
L3UCHAR buf[1]; /* Dynamic buffer */
@ -1679,7 +1679,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
L3UCHAR buf[1]; /* Dynamic buffer */
}Q931mes_Segment;
@ -1694,7 +1694,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie SendComplete; /* Sending Complete */
ie RepeatInd; /* Repeat Indicator */
ie BearerCap; /* Bearer Capability */
@ -1743,7 +1743,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie ChanID; /* Channel ID */
ie ProgInd; /* Progress Indicator */
ie Display; /* Display */
@ -1762,7 +1762,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Cause; /* Cause */
ie CallState; /* Call State */
ie Display; /* Display */
@ -1780,7 +1780,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Display; /* Display */
L3UCHAR buf[1]; /* Dynamic buffer */
}Q931mes_StatusEnquiry;
@ -1796,7 +1796,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie CallID; /* Call Identity */
L3UCHAR buf[1]; /* Dynamic buffer */
}Q931mes_Suspend;
@ -1812,7 +1812,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Display; /* Display */
L3UCHAR buf[1]; /* Dynamic buffer */
}Q931mes_SuspendAck;
@ -1828,7 +1828,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie Cause; /* Cause */
ie Display; /* Display */
L3UCHAR buf[1]; /* Dynamic buffer */
@ -1845,7 +1845,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie CongLevel; /* Congestion level */
ie Cause; /* Cause */
ie Display; /* Display */
@ -1863,7 +1863,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie MoreData; /* More data */
ie UserUser; /* User-user */
L3UCHAR buf[1]; /* Dynamic buffer */
@ -1880,7 +1880,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie ChanID; /* Channel identification */
ie Display; /* Display */
ie RestartInd; /* Restart indicator */
@ -1898,7 +1898,7 @@ typedef struct
L3UINT Size; /* Size of message in bytes */
L3UCHAR ProtDisc; /* Protocol Discriminator */
L3UCHAR MesType; /* Message type */
L3USHORT CRV; /* Call reference value */
L3INT CRV; /* Call reference value */
ie ChanID; /* Channel identification */
ie Display; /* Display */
ie RestartWin; /* Restart Window */
@ -1946,7 +1946,7 @@ typedef struct
{
Q931_TrState_NoAlignment=0, /* Trunk not aligned */
Q931_TrState_Aligning=1, /* Aligning in progress */
Q931_TrState_Aligned=2, /* Trunk Aligned */
Q931_TrState_Aligned=2 /* Trunk Aligned */
}TrunkState;
L3INT LastCRV; /* Last used crv for the trunk. */
@ -2377,8 +2377,8 @@ L3INT Q931CreateCRV(Q931_TrunkInfo *pTrunk, L3INT * callIndex);
L3INT Q931AllocateCRV(Q931_TrunkInfo *pTrunk, L3INT iCRV, L3INT * callIndex);
L3INT Q931FindCRV(Q931_TrunkInfo *pTrunk, L3INT crv, L3INT *callindex);
L3INT Q931GetCallState(Q931_TrunkInfo *pTrunk, L3INT iCRV);
L3INT Q931StartTimer(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3INT iTimer);
L3INT Q931StopTimer(Q931_TrunkInfo *pTrunk, L3INT callindex, L3INT iTimer);
L3INT Q931StartTimer(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3USHORT iTimer);
L3INT Q931StopTimer(Q931_TrunkInfo *pTrunk, L3INT callindex, L3USHORT iTimer);
L3INT Q931SetState(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3INT iState);
L3ULONG Q931GetTime();
void Q931AddStateEntry(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir);