[asterisk-commits] may: branch 10 r365160 - in /branches/10: ./ addons/ooh323c/src/ addons/ooh32...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 3 10:01:17 CDT 2012
Author: may
Date: Thu May 3 10:01:14 2012
New Revision: 365160
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=365160
Log:
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)
........
Merged revisions 365159 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/addons/ooh323c/src/h323/H323-MESSAGES.h
branches/10/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
branches/10/addons/ooh323c/src/ooh323.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/addons/ooh323c/src/h323/H323-MESSAGES.h
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/ooh323c/src/h323/H323-MESSAGES.h?view=diff&rev=365160&r1=365159&r2=365160
==============================================================================
--- branches/10/addons/ooh323c/src/h323/H323-MESSAGES.h (original)
+++ branches/10/addons/ooh323c/src/h323/H323-MESSAGES.h Thu May 3 10:01:14 2012
@@ -169,7 +169,7 @@
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);
Modified: branches/10/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/ooh323c/src/h323/H323-MESSAGESEnc.c?view=diff&rev=365160&r1=365159&r2=365160
==============================================================================
--- branches/10/addons/ooh323c/src/h323/H323-MESSAGESEnc.c (original)
+++ branches/10/addons/ooh323c/src/h323/H323-MESSAGESEnc.c Thu May 3 10:01:14 2012
@@ -223,11 +223,11 @@
/* */
/**************************************************************/
-EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier value)
-{
- int stat = ASN_OK;
-
- stat = encodeObjectIdentifier (pctxt, &value);
+EXTERN int asn1PE_H225ProtocolIdentifier (OOCTXT* pctxt, H225ProtocolIdentifier* value)
+{
+ int stat = ASN_OK;
+
+ stat = encodeObjectIdentifier (pctxt, value);
if (stat != ASN_OK) return stat;
return (stat);
@@ -6371,7 +6371,7 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* encode protocolIdentifier */
- stat = asn1PE_H225ProtocolIdentifier (pctxt, pvalue->protocolIdentifier);
+ stat = asn1PE_H225ProtocolIdentifier (pctxt, &pvalue->protocolIdentifier);
if (stat != ASN_OK) return stat;
/* encode nonStandardData */
Modified: branches/10/addons/ooh323c/src/ooh323.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/ooh323c/src/ooh323.c?view=diff&rev=365160&r1=365159&r2=365160
==============================================================================
--- branches/10/addons/ooh323c/src/ooh323.c (original)
+++ branches/10/addons/ooh323c/src/ooh323.c Thu May 3 10:01:14 2012
@@ -40,7 +40,7 @@
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 @@
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);
@@ -388,7 +388,7 @@
"%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;
@@ -644,7 +644,7 @@
return OO_FAILED;
}
- ooHandleH2250ID(call, callProceeding->protocolIdentifier);
+ ooHandleH2250ID(call, &callProceeding->protocolIdentifier);
/* Handle fast-start */
if(OO_TESTFLAG (call->flags, OO_M_FASTSTART))
{
@@ -873,7 +873,7 @@
}
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))
@@ -1110,7 +1110,7 @@
}
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))
@@ -1354,7 +1354,7 @@
}
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))
@@ -1853,7 +1853,7 @@
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)
{
More information about the asterisk-commits
mailing list