Changeset 280:3019f6220122 in freeDiameter
- Timestamp:
- Apr 27, 2010, 10:44:43 AM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfreeDiameter/messages.c
r258 r280 1873 1873 int count, first, last, min; 1874 1874 struct parserules_data * pr_data = data; 1875 char * avp_name = "<unresolved name>"; 1875 1876 1876 1877 TRACE_ENTRY("%p %p", data, rule); … … 1879 1880 parserules_stat_avps( rule->rule_avp, pr_data->sentinel, &count, &first, &last); 1880 1881 1881 if (TRACE_BOOL( ANNOYING))1882 if (TRACE_BOOL(INFO)) 1882 1883 { 1883 1884 struct dict_avp_data avpdata; 1884 1885 int ret; 1885 1886 ret = fd_dict_getval(rule->rule_avp, &avpdata); 1887 if (ret == 0) 1888 avp_name = avpdata.avp_name; 1886 1889 1887 1890 TRACE_DEBUG(ANNOYING, "Checking rule: p:%d(%d) m/M:%2d/%2d. Counted %d (first: %d, last:%d) of AVP '%s'", … … 1893 1896 first, 1894 1897 last, 1895 (ret == 0) ? avpdata.avp_name : "???"1898 avp_name 1896 1899 ); 1897 1900 } … … 1907 1910 } 1908 1911 if (count < min) { 1909 TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is < the rule min (%d) .", count, min);1912 TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is < the rule min (%d) for '%s'.", count, min, avp_name); 1910 1913 if (pr_data->pei) { 1911 1914 pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; … … 1917 1920 /* Check the "max" value */ 1918 1921 if ((rule->rule_max != -1) && (count > rule->rule_max)) { 1919 TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is > the rule max (%d) .", count, rule->rule_max);1922 TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is > the rule max (%d) for '%s'.", count, rule->rule_max, avp_name); 1920 1923 if (pr_data->pei) { 1921 1924 if (rule->rule_max == 0) … … 1938 1941 /* Since "0*1<fixed>" is a valid rule specifier, we only reject cases where the AVP appears *after* its fixed position */ 1939 1942 if (first > rule->rule_order) { 1940 TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) .", first, rule->rule_order);1943 TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) for '%s'.", first, rule->rule_order, avp_name); 1941 1944 if (pr_data->pei) { 1942 1945 pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; … … 1951 1954 /* Since "0*1<fixed>" is a valid rule specifier, we only reject cases where the AVP appears *before* its fixed position */ 1952 1955 if (last > rule->rule_order) { /* We have a ">" here because we count in reverse order (i.e. from the end) */ 1953 TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) .", last, rule->rule_order);1956 TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) for '%s'.", last, rule->rule_order, avp_name); 1954 1957 if (pr_data->pei) { 1955 1958 pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP";
Note: See TracChangeset
for help on using the changeset viewer.