[svn-commits] rmudgett: mISDNuser/trunk r35 - /mISDNuser/trunk/suppserv/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 24 12:57:16 CST 2008


Author: rmudgett
Date: Wed Dec 24 12:57:15 2008
New Revision: 35

URL: http://svn.digium.com/view/thirdparty?view=rev&rev=35
Log:
Removed conditional code slated for deletion in previous commit

Modified:
    mISDNuser/trunk/suppserv/asn1.h
    mISDNuser/trunk/suppserv/asn1_address.c
    mISDNuser/trunk/suppserv/asn1_diversion.c
    mISDNuser/trunk/suppserv/asn1_diversion.h

Modified: mISDNuser/trunk/suppserv/asn1.h
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1.h?view=diff&rev=35&r1=34&r2=35
==============================================================================
--- mISDNuser/trunk/suppserv/asn1.h (original)
+++ mISDNuser/trunk/suppserv/asn1.h Wed Dec 24 12:57:15 2008
@@ -33,73 +33,11 @@
 	ReturnErrorP = 3,
 } asn1Problem;
 
-#if 0	/* BUGBUG delete this conditional code */
-struct PublicPartyNumber {
-	int publicTypeOfNumber;
-	char numberDigits[30];
-};
-
-struct PartyNumber {
-	int type;
-	union {
-		char unknown[30];
-		struct PublicPartyNumber publicPartyNumber;
-	} p;
-};
-
-struct Address {
-	struct PartyNumber partyNumber;
-	char partySubaddress[30];
-};
-
-struct ServedUserNr {
-	int all;
-	struct PartyNumber partyNumber;
-};
-
-struct ActDivNotification {
-	int procedure;
-	int basicService;
-	struct ServedUserNr servedUserNr;
-	struct Address address;
-};
-
-struct DeactDivNotification {
-	int procedure;
-	int basicService;
-	struct ServedUserNr servedUserNr;
-};
-
-struct ReqCallDeflection {
-	struct Address address;
-	int pres;
-};
-
-struct ServedUserNumberList {
-	struct PartyNumber partyNumber[10];
-};
-
-struct IntResult {
-	struct ServedUserNr servedUserNr;
-	int procedure;
-	int basicService;
-	struct Address address;
-};
-
-struct IntResultList {
-	struct IntResult intResult[10];
-};
-#endif
 
 struct asn1Invoke {
 	__s16 invokeId;
 	__u16 operationValue;
 	union {
-#if 0	/* BUGBUG delete this conditional code */
-		struct ActDivNotification actNot;
-		struct DeactDivNotification deactNot;
-		struct ReqCallDeflection reqCD;
-#endif
 		struct FacAOCDChargingUnit AOCDchu;
 		struct FacAOCDCurrency AOCDcur;
 
@@ -156,11 +94,6 @@
 	int operationValuePresent;
 	int operationValue;
 	union {
-#if 0	/* BUGBUG delete this conditional code */
-		struct ServedUserNumberList list;
-		struct IntResultList resultList;
-#endif
-
 		struct FacStatusRequest_RES StatusRequest;
 
 		/* CCBS/CCNR support */
@@ -436,12 +369,6 @@
 int encodePresentedNumberUnscreened_Full(__u8 *Dest, const struct FacPresentedNumberUnscreened *Presented);
 int encodePresentedAddressScreened_Full(__u8 *Dest, const struct FacPresentedAddressScreened *Presented);
 
-#if 0	/* BUGBUG delete this conditional code */
-int encodePublicPartyNumber(__u8 *dest, __s8 *facilityPartyNumber);
-int encodePartyNumber(__u8 *dest, __s8 *facilityPartyNumber);
-int encodeAddress(__u8 *dest, __s8 *facilityPartyNumber, __s8 *calledPartySubaddress);
-#endif
-
 /*
 ** ASN.1 Parsing
 */
@@ -471,25 +398,6 @@
 int ParseAddress_Full(struct asn1_parm *pc, u_char *p, u_char *end, struct FacAddress *Address);
 int ParsePresentedNumberUnscreened_Full(struct asn1_parm *pc, u_char *p, u_char *end, struct FacPresentedNumberUnscreened *Presented);
 int ParsePresentedAddressScreened_Full(struct asn1_parm *pc, u_char *p, u_char *end, struct FacPresentedAddressScreened *Presented);
-
-#if 0	/* BUGBUG delete this conditional code */
-int ParsePresentedAddressScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParsePresentedNumberScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParsePresentedNumberUnscreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseAddressScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseNumberScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseAddress(struct asn1_parm *pc, u_char *p, u_char *end, struct Address *address);
-int ParsePartyNumber(struct asn1_parm *pc, u_char *p, u_char *end, struct PartyNumber *partyNumber);
-int ParsePublicPartyNumber(struct asn1_parm *pc, u_char *p, u_char *end, struct PublicPartyNumber *publicPartyNumber);
-int ParsePrivatePartyNumber(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParsePublicTypeOfNumber(struct asn1_parm *pc, u_char *p, u_char *end, int *publicTypeOfNumber);
-int ParsePrivateTypeOfNumber(struct asn1_parm *pc, u_char *p, u_char *end, int *privateTypeOfNumber);
-int ParsePartySubaddress(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseUserSpecifiedSubaddress(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseNSAPSubaddress(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseSubaddressInformation(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-int ParseScreeningIndicator(struct asn1_parm *pc, u_char *p, u_char *end, char *str);
-#endif
 
 /* Advice Of Charge (AOC) prototypes */
 int ParseAOCECurrency(struct asn1_parm *pc, u_char *p, u_char *end, int dummy);
@@ -514,11 +422,6 @@
 int ParseChargingAssociation(struct asn1_parm *pc,u_char *p, u_char *end, int dummy);
 int ParseChargeIdentifier(struct asn1_parm *pc,u_char *p, u_char *end, int dummy);
 
-#if 0	/* BUGBUG delete this conditional code */
-/* Basic-Service-Elements prototypes */
-int ParseBasicService(struct asn1_parm *pc, u_char *p, u_char *end, int *basicService);
-#endif
-
 
 /* ------------------------------------------------------------------- */
 

Modified: mISDNuser/trunk/suppserv/asn1_address.c
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1_address.c?view=diff&rev=35&r1=34&r2=35
==============================================================================
--- mISDNuser/trunk/suppserv/asn1_address.c (original)
+++ mISDNuser/trunk/suppserv/asn1_address.c Wed Dec 24 12:57:15 2008
@@ -9,300 +9,6 @@
 #include <string.h>
 
 /* ------------------------------------------------------------------- */
-#if 0	/* BUGBUG delete this section */
-static int ParseNumberDigits(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	struct asn1ParseString number;
-
-	number.buf = str;
-	number.maxSize = 30;/* sizeof(struct partyNumber.p.unknown) and sizeof(struct publicPartyNumber.numberDigits) */
-	return ParseNumericString(pc, p, end, &number);
-}
-
-int ParsePresentationRestricted(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	int ret;
-
-	ret = ParseNull(pc, p, end, -1);
-	if (ret < 0)
-		return ret;
-	strcpy(str, "(presentation restricted)");
-	return ret;
-}
-
-int ParseNotAvailInterworking(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	int ret;
-
-	ret = ParseNull(pc, p, end, -1);
-	if (ret < 0)
-		return ret;
-	strcpy(str, "(not available)");
-	return ret;
-}
-
-int ParsePresentedAddressScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	INIT;
-
-	XCHOICE_1(ParseAddressScreened, ASN1_TAG_CONTEXT_SPECIFIC | ASN1_TAG_CONSTRUCTED, 0, str);
-	XCHOICE_1(ParsePresentationRestricted, ASN1_TAG_CONTEXT_SPECIFIC, 1, str);
-	XCHOICE_1(ParseNotAvailInterworking, ASN1_TAG_CONTEXT_SPECIFIC, 2, str);
-	XCHOICE_1(ParseAddressScreened, ASN1_TAG_CONTEXT_SPECIFIC, 3, str);
-	XCHOICE_DEFAULT;
-}
-
-int ParsePresentedNumberScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	INIT;
-
-	XCHOICE_1(ParseNumberScreened, ASN1_TAG_CONTEXT_SPECIFIC | ASN1_TAG_CONSTRUCTED, 0, str);
-	XCHOICE_1(ParsePresentationRestricted, ASN1_TAG_CONTEXT_SPECIFIC, 1, str);
-	XCHOICE_1(ParseNotAvailInterworking, ASN1_TAG_CONTEXT_SPECIFIC, 2, str);
-	XCHOICE_1(ParseNumberScreened, ASN1_TAG_CONTEXT_SPECIFIC, 3, str);
-	XCHOICE_DEFAULT;
-}
-
-int ParsePresentedNumberUnscreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	struct PartyNumber partyNumber;
-	INIT;
-
-	XCHOICE_1(ParsePartyNumber, ASN1_TAG_CONTEXT_SPECIFIC | ASN1_TAG_CONSTRUCTED, 0, &partyNumber); // FIXME EXP
-	XCHOICE_1(ParsePresentationRestricted, ASN1_TAG_CONTEXT_SPECIFIC, 1, str);
-	XCHOICE_1(ParseNotAvailInterworking, ASN1_TAG_CONTEXT_SPECIFIC, 2, str);
-	XCHOICE_1(ParsePartyNumber, ASN1_TAG_CONTEXT_SPECIFIC | ASN1_TAG_CONSTRUCTED, 3, &partyNumber); // FIXME EXP
-	XCHOICE_DEFAULT;
-}
-
-int ParseNumberScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	struct PartyNumber partyNumber;
-	char screeningIndicator[30];
-	INIT;
-
-	XSEQUENCE_1(ParsePartyNumber, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &partyNumber);
-	XSEQUENCE_1(ParseScreeningIndicator, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, screeningIndicator);
-
-//	str += sprintf(str, "%s", partyNumber);
-
-	return p - beg;
-}
-
-int ParseAddressScreened(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	struct PartyNumber partyNumber;
-	char partySubaddress[30] = { 0, };
-	char screeningIndicator[30];
-	INIT;
-
-	XSEQUENCE_1(ParsePartyNumber, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &partyNumber);
-	XSEQUENCE_1(ParseScreeningIndicator, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, screeningIndicator);
-	XSEQUENCE_OPT_1(ParsePartySubaddress, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, partySubaddress);
-
-//	str += sprintf(str, "%s", partyNumber);
-	if (strlen(partySubaddress))
-		str += sprintf(str, ".%s", partySubaddress);
-
-	return p - beg;
-}
-
-int ParseAddress(struct asn1_parm *pc, u_char *p, u_char *end, struct Address *address)
-{
-	INIT;
-
-	address->partySubaddress[0] = 0;
-	XSEQUENCE_1(ParsePartyNumber, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &address->partyNumber);
-	
-	XSEQUENCE_OPT_1(ParsePartySubaddress, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, address->partySubaddress);
-
-	return p - beg;
-}
-
-int ParsePartyNumber(struct asn1_parm *pc, u_char *p, u_char *end, struct PartyNumber *partyNumber)
-{
-	INIT;
-
-	partyNumber->type = 0;
-	XCHOICE_1(ParseNumberDigits, ASN1_TAG_CONTEXT_SPECIFIC, 0, partyNumber->p.unknown); // unknownPartyNumber
-	partyNumber->type = 1;
-	XCHOICE_1(ParsePublicPartyNumber, ASN1_TAG_CONTEXT_SPECIFIC | ASN1_TAG_CONSTRUCTED, 1, &partyNumber->p.publicPartyNumber); 
-#if 0
-	XCHOICE_1(ParseNumberDigits, ASN1_TAG_CONTEXT_SPECIFIC, 3, str); // dataPartyNumber
-	XCHOICE_1(ParseNumberDigits, ASN1_TAG_CONTEXT_SPECIFIC, 4, str); // telexPartyNumber
-	XCHOICE_1(ParsePrivatePartyNumber, ASN1_TAG_CONTEXT_SPECIFIC | ASN1_TAG_CONSTRUCTED, 5, str);
-	XCHOICE_1(ParseNumberDigits, ASN1_TAG_CONTEXT_SPECIFIC, 8, str); // nationalStandardPartyNumber
-#endif
-	XCHOICE_DEFAULT;
-}
-
-int ParsePublicPartyNumber(struct asn1_parm *pc, u_char *p, u_char *end, struct PublicPartyNumber *publicPartyNumber)
-{
-	INIT;
-
-	XSEQUENCE_1(ParsePublicTypeOfNumber, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &publicPartyNumber->publicTypeOfNumber);
-	XSEQUENCE_1(ParseNumberDigits, ASN1_TAG_NUMERIC_STRING, ASN1_NOT_TAGGED, publicPartyNumber->numberDigits);
-
-	return p - beg;
-}
-
-#if 0
-int ParsePrivatePartyNumber(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	int privateTypeOfNumber;
-	char numberDigits[30];
-	INIT;
-
-	XSEQUENCE_1(ParsePrivateTypeOfNumber, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &privateTypeOfNumber); 
-	XSEQUENCE_1(ParseNumberDigits, ASN1_TAG_NUMERIC_STRING, ASN1_NOT_TAGGED, numberDigits); 
-
-	switch (privateTypeOfNumber) {
-	case 0: str += sprintf(str, "(unknown)"); break;
-	case 1: str += sprintf(str, "(regional2)"); break;
-	case 2: str += sprintf(str, "(regional1)"); break;
-	case 3: str += sprintf(str, "(ptn)"); break;
-	case 4: str += sprintf(str, "(local)"); break;
-	case 6: str += sprintf(str, "(abbrev)"); break;
-	}
-	str += sprintf(str, numberDigits);
-
-	return p - beg;
-}
-#endif
-
-int ParsePublicTypeOfNumber(struct asn1_parm *pc, u_char *p, u_char *end, int *publicTypeOfNumber)
-{
-	return ParseEnum(pc, p, end, publicTypeOfNumber);
-}
-
-#if 0
-int ParsePrivateTypeOfNumber(struct asn1_parm *pc, u_char *p, u_char *end, int *privateTypeOfNumber)
-{
-	return ParseEnum(pc, p, end, privateTypeOfNumber);
-}
-#endif
-
-int ParsePartySubaddress(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	INIT;
-
-	XCHOICE_1(ParseUserSpecifiedSubaddress, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, str);
-	XCHOICE_1(ParseNSAPSubaddress, ASN1_TAG_OCTET_STRING, ASN1_NOT_TAGGED, str);
-	XCHOICE_DEFAULT;
-}
-
-int ParseUserSpecifiedSubaddress(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	int oddCountIndicator;
-	INIT;
-
-	XSEQUENCE_1(ParseSubaddressInformation, ASN1_TAG_OCTET_STRING, ASN1_NOT_TAGGED, str);
-	XSEQUENCE_OPT_1(ParseBoolean, ASN1_TAG_BOOLEAN, ASN1_NOT_TAGGED, &oddCountIndicator);
-	
-	return p - beg;
-}
-
-int ParseNSAPSubaddress(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	struct asn1ParseString subaddress;
-
-	subaddress.buf = str;
-	subaddress.maxSize = 30;/* sizeof(struct Address.partySubaddress) */
-	return ParseOctetString(pc, p, end, &subaddress);
-}
-
-int ParseSubaddressInformation(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	struct asn1ParseString subaddress;
-
-	subaddress.buf = str;
-	subaddress.maxSize = 30;/* sizeof(struct Address.partySubaddress) */
-	return ParseOctetString(pc, p, end, &subaddress);
-}
-
-int ParseScreeningIndicator(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	int ret;
-	int screeningIndicator;
-
-	ret = ParseEnum(pc, p, end, &screeningIndicator);
-	if (ret < 0)
-		return ret;
-	
-	switch (screeningIndicator) {
-	case 0: sprintf(str, "user provided, not screened"); break;
-	case 1: sprintf(str, "user provided, passed"); break;
-	case 2: sprintf(str, "user provided, failed"); break;
-	case 3: sprintf(str, "network provided"); break;
-	default: sprintf(str, "(%d)", screeningIndicator); break;
-	}
-
-	return ret;
-}
-
-
-
-
-int encodePublicPartyNumber(__u8 *dest, __s8 *facilityPartyNumber)
-{
-	__u8 *p;
-
-	dest[0] = ASN1_TAG_SEQUENCE;
-
-	/* Store value */
-	p = &dest[2];
-	p += encodeEnum(p, ASN1_TAG_ENUM, (facilityPartyNumber[2] & 0x70) >> 4);
-	p += encodeNumericString(p, ASN1_TAG_NUMERIC_STRING, &facilityPartyNumber[4], facilityPartyNumber[0] - 3);
-
-	/* length */
-	dest[1] = p - &dest[2];
-
-	return p - dest;
-}
-
-int encodePartyNumber(__u8 *dest, __s8 *facilityPartyNumber)
-{
-	__u8 *p = dest;
-
-	p += encodeNumericString(p, ASN1_TAG_CONTEXT_SPECIFIC | 0, facilityPartyNumber, strlen((char *)facilityPartyNumber));
-#if 0
-	switch (facilityPartyNumber[1]) {
-	case 0: // unknown
-		p += encodeNumericString(p, ASN1_TAG_CONTEXT_SPECIFIC | 1, &facilityPartyNumber[4], facilityPartyNumber[0] - 3);
-		break;
-	case 1: // publicPartyNumber
-		p += encodePublicPartyNumber(p, facilityPartyNumber);
-		dest[0] &= ASN1_TAG_CONSTRUCTED; /* Keep constructed flag */
-		dest[0] |= ASN1_TAG_CONTEXT_SPECIFIC | 1;
-		break;
-	default:
-		int_error();
-		return -1;
-	}
-#endif
-	return p - dest;
-}
-
-int encodeAddress(__u8 *dest, __s8 *facilityPartyNumber, __s8 *calledPartySubaddress)
-{
-	__u8 *p = dest;
-
-	dest[0] = ASN1_TAG_SEQUENCE;
-
-	/* Store value */
-	p = &dest[2];
-	p += encodePartyNumber(p, facilityPartyNumber);
-#if 0 // FIXME
-	if (calledPartySubaddress[0])
-		p += encodePartySubaddress(p, calledPartySubaddress);
-#endif
-
-	/* length */
-	dest[1] = p - &dest[2];
-
-	return p - dest;
-}
-#else
 
 
 
@@ -952,7 +658,6 @@
 
 	XCHOICE_DEFAULT;
 }	/* end ParsePresentedAddressScreened_Full() */
-#endif
 
 
 

Modified: mISDNuser/trunk/suppserv/asn1_diversion.c
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1_diversion.c?view=diff&rev=35&r1=34&r2=35
==============================================================================
--- mISDNuser/trunk/suppserv/asn1_diversion.c (original)
+++ mISDNuser/trunk/suppserv/asn1_diversion.c Wed Dec 24 12:57:15 2008
@@ -10,349 +10,6 @@
 #include <string.h>
 
 /* ------------------------------------------------------------------- */
-#if 0	/* BUGBUG delete this section */
-int
-ParseARGReqCallDeflection(struct asn1_parm *pc, u_char *p, u_char *end, struct ReqCallDeflection *reqCD)
-{
-	INIT;
-
-	XSEQUENCE_1(ParseAddress, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &reqCD->address);
-	XSEQUENCE_1(ParseBoolean, ASN1_TAG_BOOLEAN, ASN1_NOT_TAGGED, &reqCD->pres);
-
-	return p - beg;
-}
-
-#if 0
-int
-ParseARGActivationDiversion(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	int procedure, basicService;
-	struct ServedUserNr servedUserNr;
-	struct Address address;
-	INIT;
-
-	XSEQUENCE_1(ParseProcedure, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &procedure);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &basicService);
-	XSEQUENCE_1(ParseAddress, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &address);
-	XSEQUENCE_1(ParseServedUserNr, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &servedUserNr);
-
-	return p - beg;
-}
-
-int
-ParseARGDeactivationDiversion(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	int procedure, basicService;
-	struct ServedUserNr servedUserNr;
-	INIT;
-
-	XSEQUENCE_1(ParseProcedure, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &procedure);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &basicService);
-	XSEQUENCE_1(ParseServedUserNr, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &servedUserNr);
-
-	print_asn1msg(PRT_SHOWNUMBERS, "Deactivation Diversion %d (%d), \n",
-		  procedure, basicService);
-	return p - beg;
-}
-#endif
-
-int
-ParseARGActivationStatusNotificationDiv(struct asn1_parm *pc, u_char *p, u_char *end, struct ActDivNotification *actNot)
-{
-	INIT;
-
-	XSEQUENCE_1(ParseProcedure, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &actNot->procedure);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &actNot->basicService);
-	XSEQUENCE_1(ParseAddress, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &actNot->address);
-	XSEQUENCE_1(ParseServedUserNr, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &actNot->servedUserNr);
-
-	return p - beg;
-}
-
-int
-ParseARGDeactivationStatusNotificationDiv(struct asn1_parm *pc, u_char *p, u_char *end, struct DeactDivNotification *deactNot)
-{
-	INIT;
-
-	XSEQUENCE_1(ParseProcedure, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &deactNot->procedure);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &deactNot->basicService);
-	XSEQUENCE_1(ParseServedUserNr, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &deactNot->servedUserNr);
-
-	return p - beg;
-}
-
-#if 0
-int
-ParseARGInterrogationDiversion(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	int procedure, basicService;
-	struct ServedUserNr servedUserNr;
-	INIT;
-
-	XSEQUENCE_1(ParseProcedure, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &procedure);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &basicService);
-	XSEQUENCE_1(ParseServedUserNr, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &servedUserNr);
-
-	print_asn1msg(PRT_SHOWNUMBERS, "Interrogation Diversion %d (%d), \n",
-		procedure, basicService);
-	return p - beg;
-}
-#endif
-
-int
-ParseRESInterrogationDiversion(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	print_asn1msg(PRT_SHOWNUMBERS, "Interrogation Diversion Result\n");
-	return ParseIntResultList(pc, p,  end, &pc->u.retResult.o.resultList);
-}
-
-#if 0
-int
-ParseARGInterrogateServedUserNumbers(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	print_asn1msg(PRT_SHOWNUMBERS, "Interrogate Served User Numbers\n");
-	return 0;
-}
-#endif
-
-int
-ParseRESInterrogateServedUserNumbers(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	int ret;
-
-	ret = ParseServedUserNumberList(pc, p, end, &pc->u.retResult.o.list);
-	if (ret < 0)
-		return ret;
-
-	print_asn1msg(PRT_SHOWNUMBERS, "Interrogate Served User Numbers:\n");
-
-	return ret;
-}
-
-int
-ParseARGDiversionInformation(struct asn1_parm *pc, u_char *p, u_char *end, int dummy)
-{
-	char diversionReason[20];
-	int basicService;
-	char servedUserSubaddress[30];
-	char callingAddress[80];
-	char originalCalledNr[80];
-	char lastDivertingNr[80];
-	char lastDivertingReason[20];
-	INIT;
-
-	servedUserSubaddress[0] = 0;
-	callingAddress[0] = 0;
-	originalCalledNr[0] = 0;
-	lastDivertingNr[0] = 0;
-	lastDivertingReason[0] = 0;
-
-	XSEQUENCE_1(ParseDiversionReason, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, diversionReason);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &basicService);
-	XSEQUENCE_OPT_1(ParsePartySubaddress, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, servedUserSubaddress);
-	XSEQUENCE_OPT_1(ParsePresentedAddressScreened, ASN1_TAG_CONTEXT_SPECIFIC, 0 | ASN1_TAG_EXPLICIT, callingAddress);
-	XSEQUENCE_OPT_1(ParsePresentedNumberUnscreened, ASN1_TAG_CONTEXT_SPECIFIC, 1 | ASN1_TAG_EXPLICIT, originalCalledNr);
-	XSEQUENCE_OPT_1(ParsePresentedNumberUnscreened, ASN1_TAG_CONTEXT_SPECIFIC, 2 | ASN1_TAG_EXPLICIT, lastDivertingNr);
-	XSEQUENCE_OPT_1(ParseDiversionReason, ASN1_TAG_CONTEXT_SPECIFIC, 3 | ASN1_TAG_EXPLICIT, lastDivertingReason);
-//	XSEQUENCE_OPT_1(ParseQ931InformationElement, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, userInfo);
-	print_asn1msg(PRT_SHOWNUMBERS, "Diversion Information %s(%d) %s\n"
-		  "  callingAddress %s originalCalled Nr %s\n"
-		  "  lastDivertingNr %s lastDiverting Reason %s\n",
-		  diversionReason, basicService, servedUserSubaddress, callingAddress,
-		  originalCalledNr, lastDivertingNr, lastDivertingReason);
-	return p - beg;
-}
-
-int
-ParseIntResultList(struct asn1_parm *pc, u_char *p, u_char *end, struct IntResultList *intResultList)
-{
-	int i;
-	INIT;
-
-	for (i = 0; i < 10; i++) {
-		intResultList->intResult[i].basicService = -1;
-		XSEQUENCE_OPT_1(ParseIntResult, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED,
-				&intResultList->intResult[i] );
-	}
-
-	return p - beg;
-}
-
-int
-ParseIntResult(struct asn1_parm *pc, u_char *p, u_char *end, struct IntResult *intResult)
-{
-	INIT;
-
-	XSEQUENCE_1(ParseServedUserNr, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &intResult->servedUserNr);
-	XSEQUENCE_1(ParseBasicService, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &intResult->basicService);
-	XSEQUENCE_1(ParseProcedure, ASN1_TAG_ENUM, ASN1_NOT_TAGGED, &intResult->procedure);
-	XSEQUENCE_1(ParseAddress, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &intResult->address);
-
-	return p - beg;
-}
-
-int
-ParseServedUserNrAll(struct asn1_parm *pc, u_char *p, u_char *end, struct ServedUserNr *servedUserNr)
-{
-	int ret;
-
-	ret = ParseNull(pc, p, end, 0);
-	if (ret < 0)
-		return ret;
-	servedUserNr->all = 1;
-
-	return ret;
-}
-
-int
-ParseServedUserNr(struct asn1_parm *pc, u_char *p, u_char *end, struct ServedUserNr *servedUserNr)
-{
-	INIT;
-
-	servedUserNr->all = 0;
-	XCHOICE_1(ParseServedUserNrAll, ASN1_TAG_NULL, ASN1_NOT_TAGGED, servedUserNr);
-	XCHOICE_1(ParsePartyNumber, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &servedUserNr->partyNumber);
-	XCHOICE_DEFAULT;
-}
-
-int
-ParseProcedure(struct asn1_parm *pc, u_char *p, u_char *end, int *procedure)
-{
-	return ParseEnum(pc, p, end, procedure);
-}
-
-int ParseServedUserNumberList(struct asn1_parm *pc, u_char *p, u_char *end, struct ServedUserNumberList *list)
-{
-	int i;
-	INIT;
-
-	for (i = 0; i < 10; i++) {
-		list->partyNumber[i].type = -1;
-		XSEQUENCE_OPT_1(ParsePartyNumber, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &list->partyNumber[i]);
-	}
-
-	return p - beg;
-}
-
-int
-ParseDiversionReason(struct asn1_parm *pc, u_char *p, u_char *end, char *str)
-{
-	int ret;
-	int diversionReason;
-
-	ret = ParseEnum(pc, p, end, &diversionReason);
-	if (ret < 0)
-		return ret;
-
-	switch (diversionReason) {
-	case 0: sprintf(str, "unknown"); break;
-	case 1: sprintf(str, "CFU"); break;
-	case 2: sprintf(str, "CFB"); break;
-	case 3: sprintf(str, "CFNR"); break;
-	case 4: sprintf(str, "CD (Alerting)"); break;
-	case 5: sprintf(str, "CD (Immediate)"); break;
-	default: sprintf(str, "(%d)", diversionReason); break;
-	}
-
-	return ret;
-}
-
-
-
-
-static int encodeServedUserNumber(__u8 *dest, __s8 *servedUserNumber)
-{
-	if (servedUserNumber[0])
-		return encodePartyNumber(dest, servedUserNumber);
-	else
-		return encodeNull(dest, ASN1_TAG_NULL);
-}
-
-int encodeFacActivationDiversion(__u8 *dest, struct FacCFActivate *CFActivate)
-{
-	__u8 *p;
-	__u8 *SeqStart;
-
-	p = encodeComponentInvoke_Head(dest, 0x02 /* InvokeID */, Fac_ActivationDiversion);
-
-	SeqStart = p;
-	SeqStart[0] = ASN1_TAG_SEQUENCE;
-	p = &SeqStart[2];
-
-	p += encodeEnum(p, ASN1_TAG_ENUM, CFActivate->Procedure);
-	p += encodeEnum(p, ASN1_TAG_ENUM, CFActivate->BasicService);
-	p += encodeAddress(p, CFActivate->ForwardedToNumber, CFActivate->ForwardedToSubaddress);
-	p += encodeServedUserNumber(p, CFActivate->ServedUserNumber);
-
-	/* sequence Length */
-	SeqStart[1] = p - &SeqStart[2];
-
-	return encodeComponent_Length(dest, p);
-}
-
-int encodeFacDeactivationDiversion(__u8 *dest, struct FacCFDeactivate *CFDeactivate)
-{
-	__u8 *p;
-	__u8 *SeqStart;
-
-	p = encodeComponentInvoke_Head(dest, 0x02 /* InvokeID */, Fac_DeactivationDiversion);
-
-	SeqStart = p;
-	SeqStart[0] = ASN1_TAG_SEQUENCE;
-	p = &SeqStart[2];
-
-	p += encodeEnum(p, ASN1_TAG_ENUM, CFDeactivate->Procedure);
-	p += encodeEnum(p, ASN1_TAG_ENUM, CFDeactivate->BasicService);
-	p += encodeServedUserNumber(p, CFDeactivate->ServedUserNumber);
-
-	/* sequence Length */
-	SeqStart[1] = p - &SeqStart[2];
-
-	return encodeComponent_Length(dest, p);
-}
-
-int encodeInterrogationDiversion(__u8 *dest, struct FacCFInterrogateParameters *params)
-{
-	__u8 *p;
-
-	dest[0] = ASN1_TAG_SEQUENCE;
-	dest[1] = 0;     // length
-	p = &dest[2];
-
-	p += encodeEnum(p, ASN1_TAG_ENUM, params->Procedure);
-#if 0
-	if (basicService == 0)
-		p += encodeNull(p, ASN1_TAG_NULL);
-	else
-#endif
-	p += encodeEnum(p, ASN1_TAG_ENUM, params->BasicService);
-	p += encodeServedUserNumber(p, params->ServedUserNumber);
-
-	dest[1] = p - &dest[2];
-	return p - dest;
-}
-
-
-int encodeFacCDeflection(__u8 *dest, struct FacCDeflection *CD)
-{
-	__u8 *p;
-	__u8 *SeqStart;
-
-	p = encodeComponentInvoke_Head(dest, 0x02 /* InvokeID */, Fac_CallDeflection);
-
-	SeqStart = p;
-	SeqStart[0] = ASN1_TAG_SEQUENCE;
-	p = &SeqStart[2];
-
-	p += encodeAddress(p, CD->DeflectedToNumber, CD->DeflectedToSubaddress);
-	p += encodeBoolean(p, ASN1_TAG_BOOLEAN, CD->PresentationAllowed);
-
-	/* sequence Length */
-	SeqStart[1] = p - &SeqStart[2];
-
-	return encodeComponent_Length(dest, p);
-}
-#else
 
 
 
@@ -1984,7 +1641,6 @@
 
 	return p - beg;
 }	/* end ParseDivertingLegInformation3_ARG() */
-#endif
 
 
 

Modified: mISDNuser/trunk/suppserv/asn1_diversion.h
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1_diversion.h?view=diff&rev=35&r1=34&r2=35
==============================================================================
--- mISDNuser/trunk/suppserv/asn1_diversion.h (original)
+++ mISDNuser/trunk/suppserv/asn1_diversion.h Wed Dec 24 12:57:15 2008
@@ -15,27 +15,6 @@
 
 /* ------------------------------------------------------------------- */
 
-
-#if 0	/* BUGBUG delete this section */
-int encodeFacCDeflection(__u8 *dest, struct FacCDeflection *CD);
-int encodeFacActivationDiversion(__u8 *dest, struct FacCFActivate *CFActivate);
-int encodeFacDeactivationDiversion(__u8 *dest, struct FacCFDeactivate *CFDeactivate);
-
-int ParseARGReqCallDeflection(struct asn1_parm *pc, u_char *p, u_char *end, struct ReqCallDeflection *reqCD);
-int ParseARGActivationStatusNotificationDiv(struct asn1_parm *pc, u_char *p, u_char *end, struct ActDivNotification *actNot);
-int ParseARGDeactivationStatusNotificationDiv(struct asn1_parm *pc, u_char *p, u_char *end, struct DeactDivNotification *deactNot);
-int ParseARGInterrogationDiversion(struct asn1_parm *parm, u_char *p, u_char *end, int dummy);
-int ParseRESInterrogationDiversion(struct asn1_parm *parm, u_char *p, u_char *end, int dummy);
-int ParseARGInterrogateServedUserNumbers(struct asn1_parm *parm, u_char *p, u_char *end, int dummy);
-int ParseRESInterrogateServedUserNumbers(struct asn1_parm *parm, u_char *p, u_char *end, int dummy);
-int ParseARGDiversionInformation(struct asn1_parm *parm, u_char *p, u_char *end, int dummy);
-int ParseIntResult(struct asn1_parm *parm, u_char *p, u_char *end, struct IntResult *intResult);
-int ParseIntResultList(struct asn1_parm *parm, u_char *p, u_char *end, struct IntResultList *intResultList);
-int ParseServedUserNr(struct asn1_parm *parm, u_char *p, u_char *end, struct ServedUserNr *servedUserNr);
-int ParseProcedure(struct asn1_parm *pc, u_char *p, u_char *end, int *procedure);
-int ParseServedUserNumberList(struct asn1_parm *parm, u_char *p, u_char *end, struct ServedUserNumberList *list);
-int ParseDiversionReason(struct asn1_parm *parm, u_char *p, u_char *end, char *str);
-#else
 
 int encodeFacActivationDiversion(__u8 *Dest, const struct FacActivationDiversion *ActivationDiversion);
 int ParseActivationDiversion_ARG(struct asn1_parm *pc, u_char *p, u_char *end, struct FacActivationDiversion_ARG *ActivationDiversion);
@@ -75,7 +54,6 @@
 
 int encodeFacDivertingLegInformation3(__u8 *Dest, const struct FacDivertingLegInformation3 *DivertingLegInformation3);
 int ParseDivertingLegInformation3_ARG(struct asn1_parm *pc, u_char *p, u_char *end, struct FacDivertingLegInformation3 *DivertingLegInformation3);
-#endif
 
 
 /* ------------------------------------------------------------------- */




More information about the svn-commits mailing list