changeset 1149:5d19d6f3e1bd

Merged
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 17 May 2013 11:06:21 +0800
parents 1399ef1aa9bf (current diff) fe4340e95815 (diff)
children 611c5691661d
files
diffstat 3 files changed, 46 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/dict_dcca_3gpp/dict_dcca_3gpp.c	Fri May 17 11:05:10 2013 +0800
+++ b/extensions/dict_dcca_3gpp/dict_dcca_3gpp.c	Fri May 17 11:06:21 2013 +0800
@@ -10340,6 +10340,31 @@
 	/* 32.299 */
 
 	{
+		/* additional allowed AVPs */
+		struct dict_object *ccr;
+		CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Request", &ccr);
+		struct local_rules_definition rules[] = 
+			{
+				{ { .avp_vendor = 10415, .avp_name = "AoC-Request-Type"}, RULE_OPTIONAL, -1, 1 },
+				{ { .avp_vendor = 10415, .avp_name = "Service-Information"}, RULE_OPTIONAL, -1, 1 },
+			};
+		PARSE_loc_rules(rules, ccr);
+        }
+
+	{
+		/* additional allowed AVPs */
+		struct dict_object *ccr;
+		CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Answer", &ccr);
+		struct local_rules_definition rules[] = 
+			{
+				{ { .avp_vendor = 10415, .avp_name = "Low-Balance-Indication"}, RULE_OPTIONAL, -1, 1 },
+				{ { .avp_vendor = 10415, .avp_name = "Remaining-Balance"}, RULE_OPTIONAL, -1, 1 },
+				{ { .avp_vendor = 10415, .avp_name = "Service-Information"}, RULE_OPTIONAL, -1, 1 },
+			};
+		PARSE_loc_rules(rules, ccr);
+        }
+
+	{
 		struct dict_object *rule_avp;
 		struct dict_avp_request vpa;
 		vpa.avp_vendor = 10415;
@@ -10375,6 +10400,21 @@
 		struct dict_object *rule_avp;
 		struct dict_avp_request vpa;
 		vpa.avp_vendor = 10415;
+		vpa.avp_name = "Event-Type";
+		CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp);
+		struct local_rules_definition rules[] =
+			{
+				{ { .avp_vendor = 10415, .avp_name = "SIP-Method" }, RULE_OPTIONAL, -1, 1 },
+				{ { .avp_vendor = 10415, .avp_name = "Event" }, RULE_OPTIONAL, -1, 1 },
+				{ { .avp_vendor = 10415, .avp_name = "Expires" }, RULE_OPTIONAL, -1, 1 },
+			};
+			PARSE_loc_rules(rules, rule_avp);
+        }
+
+	{
+		struct dict_object *rule_avp;
+		struct dict_avp_request vpa;
+		vpa.avp_vendor = 10415;
 		vpa.avp_name = "IMS-Information";
 		CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp);
 		struct local_rules_definition rules[] =
@@ -10568,7 +10608,7 @@
 				{ { .avp_vendor = 10415, .avp_name = "Charging-Rule-Base-Name" }, RULE_OPTIONAL, -1, 1 },
 				{ { .avp_vendor = 10415, .avp_name = "3GPP-User-Location-Info" }, RULE_OPTIONAL, -1, 1 },
 				{ { .avp_vendor = 10415, .avp_name = "User-CSG-Information" }, RULE_OPTIONAL, -1, 1 },
-				{ { .avp_vendor = 5535, .avp_name = "3GPP2-BSID" }, RULE_OPTIONAL, -1, 1 },
+				{ { .avp_vendor = 5535,  .avp_name = "3GPP2-BSID" }, RULE_OPTIONAL, -1, 1 },
 				{ { .avp_vendor = 10415, .avp_name = "3GPP-RAT-Type" }, RULE_OPTIONAL, -1, 1 },
 				{ { .avp_vendor = 10415, .avp_name = "PS-Furnish-Charging-Information" }, RULE_OPTIONAL, -1, 1 },
 				{ { .avp_vendor = 10415, .avp_name = "PDP-Context-Type" }, RULE_OPTIONAL, -1, 1 },
--- a/libfdcore/cnxctx.c	Fri May 17 11:05:10 2013 +0800
+++ b/libfdcore/cnxctx.c	Fri May 17 11:06:21 2013 +0800
@@ -1408,6 +1408,9 @@
     				}
 				break;
 
+			default:
+				fd_log_debug("\t - unknown session type (%d)", cred);
+
 		}                           /* switch */
 
 		if (ecdh != 0)
--- a/libfdcore/extensions.c	Fri May 17 11:05:10 2013 +0800
+++ b/libfdcore/extensions.c	Fri May 17 11:06:21 2013 +0800
@@ -128,7 +128,7 @@
 		
 		if (li == &ext->chain) {
 			/* the dependency was not found */
-			TRACE_ERROR("Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.",
+			LOG_F("Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.",
 				ext->ext_name, ext->depends[i]);
 			return ESRCH;
 		}
@@ -165,14 +165,12 @@
 		if (ext->handler == NULL) {
 			/* An error occured */
 			LOG_F("Loading of extension %s failed: %s", ext->filename, dlerror());
-			#ifdef DEBUG
 			ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL);
 			if (ext->handler) {
 				if (!check_dependencies(ext)) {
-					TRACE_ERROR("In addition, not all declared dependencies are satisfied (Internal Error!)");
+					LOG_F("In addition, not all declared dependencies are satisfied (Internal Error!)");
 				}
 			}
-			#endif /* DEBUG */
 			return EINVAL;
 		}
 		
"Welcome to our mercurial repository"