diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-08-09 10:06:01 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-08-09 10:06:01 +0000 |
commit | 508e1c3027d0fd5724e9eb62c27f7acdd3f354a2 (patch) | |
tree | b14f583d974c5d8a3c508c98cbbe0aabafe1a72a /asn1 | |
parent | 1586d80a7759eb3ec659f5241cf7b969baf5250d (diff) |
From Jacob Nordgren and Rishie Sharma:
FP: fixed exotic bug where fakes counter was sometimes not reset, RRC: fixed bug where num_chans_per_flow was not properly cleared
svn path=/trunk/; revision=44375
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/rrc/packet-rrc-template.c | 35 | ||||
-rw-r--r-- | asn1/rrc/rrc.cnf | 7 |
2 files changed, 17 insertions, 25 deletions
diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c index 8a2cdef295..a2f06ea396 100644 --- a/asn1/rrc/packet-rrc-template.c +++ b/asn1/rrc/packet-rrc-template.c @@ -28,11 +28,11 @@ */ /** - * + * * TODO: * - Fix ciphering information for circuit switched stuff */ - + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -62,8 +62,8 @@ extern int proto_fp; /*Handler to FP*/ -GTree * hsdsch_muxed_flows; -GTree * rrc_ciph_inf; +GTree * hsdsch_muxed_flows = NULL; +GTree * rrc_ciph_inf = NULL; static int msg_type _U_; static dissector_handle_t gsm_a_dtap_handle; @@ -147,24 +147,24 @@ static int activation_frame; /** - * Return the maximum counter, useful for initiating counters + * Return the maximum counter, useful for initiating counters */ - #if 0 +#if 0 static int get_max_counter(int com_context){ int i; guint32 max = 0; rrc_ciphering_info * c_inf; - + if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER((gint)com_context))) == NULL ){ return 0; } for(i = 0; i<31; i++){ - max = MAX(c_inf->ps_conf_counters[i][0], max); - max = MAX(c_inf->ps_conf_counters[i][1], max); - } - return max; + max = MAX(c_inf->ps_conf_counters[i][0], max); + max = MAX(c_inf->ps_conf_counters[i][1], max); } -#endif + return max; +} +#endif /** Utility functions used for various comparisons/cleanups in tree **/ gint rrc_key_cmp(gconstpointer b_ptr, gconstpointer a_ptr, gpointer ignore _U_){ if( GPOINTER_TO_INT(a_ptr) > GPOINTER_TO_INT(b_ptr) ){ @@ -200,6 +200,9 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRC"); + /*Clear memory*/ + memset(num_chans_per_flow,0,sizeof(guint8)*RRC_MAX_NUM_HSDHSCH_MACDFLOW); + /* create the rrc protocol tree */ rrc_item = proto_tree_add_item(tree, proto_rrc, tvb, 0, -1, ENC_NA); rrc_tree = proto_item_add_subtree(rrc_item, ett_rrc); @@ -230,10 +233,7 @@ dissect_rrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - - void rrc_init(void){ - /*Cleanup*/ if(hsdsch_muxed_flows){ g_tree_destroy(hsdsch_muxed_flows); @@ -246,13 +246,12 @@ void rrc_init(void){ NULL, /* data pointer, optional */ rrc_free_key, rrc_free_value); - - /*Initialize structure for muxed flow indication*/ + + /*Initialize structure for muxed flow indication*/ rrc_ciph_inf = g_tree_new_full(rrc_key_cmp, NULL, /* data pointer, optional */ NULL, rrc_free_value); - } /*--- proto_register_rrc -------------------------------------------*/ void proto_register_rrc(void) { diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf index 9711395bb0..4369e99759 100644 --- a/asn1/rrc/rrc.cnf +++ b/asn1/rrc/rrc.cnf @@ -679,7 +679,6 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE if(type == 4){ /*If this is type HS-DSCH*/ num_chans_per_flow[flowd]++; - /*TODO: This configuration should proably be unique for each UE*/ if(num_chans_per_flow[flowd] > 1 ){ if(hrnti == NULL){ @@ -748,12 +747,6 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE #.FN_BODY MAC-d-FlowIdentity VAL_PTR = &flowd %(DEFAULT_BODY)s -#.FN_BODY SRB-InformationSetupList2-r6 - -%(DEFAULT_BODY)s - /*Clear memory*/ - memset(num_chans_per_flow,0,sizeof(guint8)); - #.FN_BODY H-RNTI VAL_PTR = &hrnti %(DEFAULT_BODY)s |