aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h248
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-12-06 19:47:22 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-12-06 19:47:22 +0000
commit94110893b7a1cb165fbb3728bbc896f897fa5fbc (patch)
tree9dce8fe334ba720f62356b95748b9b83c34ad89f /asn1/h248
parent5ae90828aee98fcb41f68c3c7c4ffafde58d6de7 (diff)
It crashed when keep_persistent_data == FALSE
svn path=/trunk/; revision=16705
Diffstat (limited to 'asn1/h248')
-rw-r--r--asn1/h248/h248.cnf4
-rw-r--r--asn1/h248/packet-h248-template.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf
index 642f2580b1..3bc853d911 100644
--- a/asn1/h248/h248.cnf
+++ b/asn1/h248/h248.cnf
@@ -85,24 +85,28 @@ ServiceChangeReply/terminationID terminationIDList
guint32 trx_id = 0;
offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
trx = h248_trx(msg,trx_id,H248_TRX_REQUEST);
+ error_code = 0;
#.END
#.FN_BODY TransactionPending/transactionId
guint32 trx_id = 0;
offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
trx = h248_trx(msg,trx_id,H248_TRX_PENDING);
+ error_code = 0;
#.END
#.FN_BODY TransactionReply/transactionId
guint32 trx_id = 0;
offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
trx = h248_trx(msg,trx_id,H248_TRX_REPLY);
+ error_code = 0;
#.END
#.FN_BODY TransactionResponseAck/transactionId
guint32 trx_id = 0;
offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
trx = h248_trx(msg,trx_id,H248_TRX_ACK);
+ error_code = 0;
#.END
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index 6a7d3cccd9..e7a100f189 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -968,6 +968,7 @@ static h248_trx_t* h248_trx(h248_msg_t* m ,guint32 t_id , h248_trx_type_t type)
t->id = t_id;
t->type = type;
t->pendings = 0;
+ t->error = 0;
t->cmds = NULL;
g_hash_table_insert(trxs,t->key,t);
@@ -990,6 +991,7 @@ static h248_trx_t* h248_trx(h248_msg_t* m ,guint32 t_id , h248_trx_type_t type)
t->id = t_id;
t->type = type;
t->pendings = 0;
+ t->error = 0;
t->cmds = NULL;
}
@@ -1184,6 +1186,7 @@ static void h248_cmd_add_term(h248_cmd_t* c, h248_term_t* t) {
ct = se_alloc(sizeof(h248_terms_t));
ct->term = se_alloc(sizeof(h248_term_t));
+ ct->next = NULL;
ct->term->str = se_strdup(t->str);
ct->term->buffer = se_memdup(t->buffer,t->len);
@@ -1200,6 +1203,7 @@ static void h248_cmd_add_term(h248_cmd_t* c, h248_term_t* t) {
} else {
ct = ep_new(h248_terms_t);
ct->term = t;
+ ct->next = NULL;
c->terms.last = c->terms.last->next = ct;
}
@@ -1383,8 +1387,10 @@ static void analyze_h248_msg(h248_msg_t* m) {
proto_tree* terms_tree = proto_item_add_subtree(terms_item,ett_ctx_cmds);
for (; ctx_term; ctx_term = ctx_term->next ) {
- proto_item* term_item = proto_tree_add_string(terms_tree,hf_h248_ctx_term,h248_tvb,0,0,ctx_term->term->str);
- PROTO_ITEM_SET_GENERATED(term_item);
+ if ( ctx_term->term && ctx_term->term->str) {
+ proto_item* term_item = proto_tree_add_string(terms_tree,hf_h248_ctx_term,h248_tvb,0,0,ctx_term->term->str);
+ PROTO_ITEM_SET_GENERATED(term_item);
+ }
}
}
}