Fix warning of Coverity Static analysis, change H225ProtocolIdentifier

from value to pointer per functions that use this.

(close issue ASTERISK-19670)
Reported by: Matt Jordan
Patches:
  ASTERISK-19670.patch (License #5415)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.15
Alexandr Anikin 13 years ago
parent 0b9bca22bd
commit 4bddfcf335

@ -169,7 +169,7 @@ EXTERN int asn1PD_H225EndpointIdentifier (OOCTXT* pctxt, H225EndpointIdentifier*
typedef ASN1OBJID H225ProtocolIdentifier;
EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier value);
EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier* value);
EXTERN int asn1PD_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier* pvalue);

@ -223,11 +223,11 @@ EXTERN int asn1PE_H225EndpointIdentifier (OOCTXT* pctxt, H225EndpointIdentifier
/* */
/**************************************************************/
EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier value)
EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier* value)
{
int stat = ASN_OK;
stat = encodeObjectIdentifier (pctxt, &value);
stat = encodeObjectIdentifier (pctxt, value);
if (stat != ASN_OK) return stat;
return (stat);
@ -6371,7 +6371,7 @@ EXTERN int asn1PE_H225Setup_UUIE (OOCTXT* pctxt, H225Setup_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode h245Address */
@ -7112,7 +7112,7 @@ EXTERN int asn1PE_H225CallProceeding_UUIE (OOCTXT* pctxt, H225CallProceeding_UUI
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode destinationInfo */
@ -7414,7 +7414,7 @@ EXTERN int asn1PE_H225Connect_UUIE (OOCTXT* pctxt, H225Connect_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode h245Address */
@ -7811,7 +7811,7 @@ EXTERN int asn1PE_H225Alerting_UUIE (OOCTXT* pctxt, H225Alerting_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode destinationInfo */
@ -8173,7 +8173,7 @@ EXTERN int asn1PE_H225Information_UUIE (OOCTXT* pctxt, H225Information_UUIE* pva
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
if (extbit) {
@ -8672,7 +8672,7 @@ EXTERN int asn1PE_H225ReleaseComplete_UUIE (OOCTXT* pctxt, H225ReleaseComplete_U
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode reason */
@ -9157,7 +9157,7 @@ EXTERN int asn1PE_H225Facility_UUIE (OOCTXT* pctxt, H225Facility_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode alternativeAddress */
@ -9580,7 +9580,7 @@ EXTERN int asn1PE_H225Progress_UUIE (OOCTXT* pctxt, H225Progress_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode destinationInfo */
@ -9726,7 +9726,7 @@ EXTERN int asn1PE_H225Status_UUIE (OOCTXT* pctxt, H225Status_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode callIdentifier */
@ -9774,7 +9774,7 @@ EXTERN int asn1PE_H225StatusInquiry_UUIE (OOCTXT* pctxt, H225StatusInquiry_UUIE*
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode callIdentifier */
@ -9822,7 +9822,7 @@ EXTERN int asn1PE_H225SetupAcknowledge_UUIE (OOCTXT* pctxt, H225SetupAcknowledge
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode callIdentifier */
@ -9870,7 +9870,7 @@ EXTERN int asn1PE_H225Notify_UUIE (OOCTXT* pctxt, H225Notify_UUIE* pvalue)
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode callIdentifier */
@ -12236,7 +12236,7 @@ EXTERN int asn1PE_H225GatekeeperRequest (OOCTXT* pctxt, H225GatekeeperRequest* p
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -12530,7 +12530,7 @@ EXTERN int asn1PE_H225GatekeeperConfirm (OOCTXT* pctxt, H225GatekeeperConfirm* p
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -12892,7 +12892,7 @@ EXTERN int asn1PE_H225GatekeeperReject (OOCTXT* pctxt, H225GatekeeperReject* pva
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -13168,7 +13168,7 @@ EXTERN int asn1PE_H225RegistrationRequest (OOCTXT* pctxt, H225RegistrationReques
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -13913,7 +13913,7 @@ EXTERN int asn1PE_H225RegistrationConfirm (OOCTXT* pctxt, H225RegistrationConfir
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -14551,7 +14551,7 @@ EXTERN int asn1PE_H225RegistrationReject (OOCTXT* pctxt, H225RegistrationReject*
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -21566,7 +21566,7 @@ EXTERN int asn1PE_H225ResourcesAvailableIndicate (OOCTXT* pctxt, H225ResourcesAv
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
@ -21702,7 +21702,7 @@ EXTERN int asn1PE_H225ResourcesAvailableConfirm (OOCTXT* pctxt, H225ResourcesAva
/* encode protocolIdentifier */
stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */

@ -40,7 +40,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg);
int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg);
int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg);
int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg);
int ooHandleH2250ID (OOH323CallData *call, H225ProtocolIdentifier protocolIdentifier);
int ooHandleH2250ID (OOH323CallData *call, H225ProtocolIdentifier* protocolIdentifier);
int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg) {
Q931InformationElement* pDisplayIE;
@ -58,10 +58,10 @@ int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg) {
return OO_OK;
}
int ooHandleH2250ID (OOH323CallData *call, H225ProtocolIdentifier protocolIdentifier) {
if (!call->h225version && (protocolIdentifier.numids >= 6) &&
(protocolIdentifier.subid[3] == 2250)) {
call->h225version = protocolIdentifier.subid[5];
int ooHandleH2250ID (OOH323CallData *call, H225ProtocolIdentifier* protocolIdentifier) {
if (!call->h225version && (protocolIdentifier->numids >= 6) &&
(protocolIdentifier->subid[3] == 2250)) {
call->h225version = protocolIdentifier->subid[5];
OOTRACEDBGC4("Extract H.225 remote version, it's %d, (%s, %s)\n", call->h225version,
call->callType, call->callToken);
@ -386,7 +386,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
"%s\n", call->callType, call->callToken);
return OO_FAILED;
}
ooHandleH2250ID(call, setup->protocolIdentifier);
ooHandleH2250ID(call, &setup->protocolIdentifier);
memcpy(call->callIdentifier.guid.data, setup->callIdentifier.guid.data,
setup->callIdentifier.guid.numocts);
call->callIdentifier.guid.numocts = setup->callIdentifier.guid.numocts;
@ -633,7 +633,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
ooHandleH2250ID(call, callProceeding->protocolIdentifier);
ooHandleH2250ID(call, &callProceeding->protocolIdentifier);
/* Handle fast-start */
if(OO_TESTFLAG (call->flags, OO_M_FASTSTART))
{
@ -862,7 +862,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
}
return OO_FAILED;
}
ooHandleH2250ID(call, alerting->protocolIdentifier);
ooHandleH2250ID(call, &alerting->protocolIdentifier);
/*Handle fast-start */
if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
!OO_TESTFLAG(call->flags, OO_M_FASTSTARTANSWERED))
@ -1099,7 +1099,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
}
return OO_FAILED;
}
ooHandleH2250ID(call, progress->protocolIdentifier);
ooHandleH2250ID(call, &progress->protocolIdentifier);
/*Handle fast-start */
if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
!OO_TESTFLAG(call->flags, OO_M_FASTSTARTANSWERED))
@ -1343,7 +1343,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
return OO_FAILED;
}
ooHandleH2250ID(call, connect->protocolIdentifier);
ooHandleH2250ID(call, &connect->protocolIdentifier);
/*Handle fast-start */
if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
!OO_TESTFLAG (call->flags, OO_M_FASTSTARTANSWERED))
@ -1841,7 +1841,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
facility = pH323UUPdu->h323_message_body.u.facility;
if(facility)
{
ooHandleH2250ID(call, facility->protocolIdentifier);
ooHandleH2250ID(call, &facility->protocolIdentifier);
/* Depending on the reason of facility message handle the message */
if(facility->reason.t == T_H225FacilityReason_transportedInformation)
{

Loading…
Cancel
Save