aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-03-19 20:45:45 +0000
committerGuy Harris <guy@alum.mit.edu>2006-03-19 20:45:45 +0000
commit7db8eea5c68284a468924639eecc2ca8959225d0 (patch)
tree8615d9607a760ce4721551cd031660083076cd49
parent624db0dc41ab9bad1bacbd95462d6dffa4afba61 (diff)
Make the GUIDs in various data structures e_guid_t's rather than arrays
of 16 bytes. Use "sizeof" for the size of e_guid_t's, and use structure assignment to copy GUID values. Make functions such as append_h225ras_call() and new_h225ras_call() take pointers to e_guid_t's as arguments. Define GUID_LEN in epan/guid-utils.h and use it as the length of a GUID in a packet. (Note that "sizeof e_guid_t" is not guaranteed to be 16, although it is guaranteed to be the size of an e_guid_t.) When constructing a display filter that matches a GUID, use guid_to_str() to construct the string for the GUID. svn path=/trunk/; revision=17676
-rw-r--r--asn1/h225/h225.cnf4
-rw-r--r--asn1/h225/packet-h225-template.c10
-rw-r--r--asn1/h225/packet-h225-template.h2
-rw-r--r--epan/dissectors/packet-h225.c14
-rw-r--r--epan/dissectors/packet-h225.h2
-rw-r--r--epan/ftypes/ftype-guid.c165
-rw-r--r--epan/guid-utils.h4
-rw-r--r--epan/h225-persistentdata.c8
-rw-r--r--epan/h225-persistentdata.h6
-rw-r--r--gtk/voip_calls.c11
-rw-r--r--gtk/voip_calls.h3
-rw-r--r--gtk/voip_calls_dlg.c13
12 files changed, 122 insertions, 120 deletions
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index 8d952da369..784dc92a03 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -449,8 +449,8 @@ ReleaseCompleteReason VAL_PTR = &value
#.FN_BODY CallIdentifier/guid
tvbuff_t *guid_tvb;
- offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,16,16,&guid_tvb);
- tvb_memcpy(guid_tvb,h225_pi->guid,0,tvb_length(guid_tvb));
+ offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,GUID_LEN,GUID_LEN,&guid_tvb);
+ tvb_memcpy(guid_tvb,(guint8 *)&h225_pi->guid,0,GUID_LEN);
#.END
#----------------------------------------------------------------------------------------
#.FN_PARS RequestSeqNum VAL_PTR = &(h225_pi->requestSeqNum)
diff --git a/asn1/h225/packet-h225-template.c b/asn1/h225/packet-h225-template.c
index 194320ee76..f9a342f554 100644
--- a/asn1/h225/packet-h225-template.c
+++ b/asn1/h225/packet-h225-template.c
@@ -378,7 +378,7 @@ static void reset_h225_packet_info(h225_packet_info *pi)
pi->msg_tag = -1;
pi->reason = -1;
pi->requestSeqNum = 0;
- memset(pi->guid,0,16);
+ memset(&pi->guid,0,sizeof pi->guid);
pi->is_duplicate = FALSE;
pi->request_available = FALSE;
pi->is_faststart = FALSE;
@@ -477,7 +477,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
and last request occured more than 1800 seconds ago,
we decide that we have a new request */
/* Append new ras call to list */
- h225ras_call = append_h225ras_call(h225ras_call, pinfo, pi->guid, msg_category);
+ h225ras_call = append_h225ras_call(h225ras_call, pinfo, &pi->guid, msg_category);
} else {
/* No, so it's a duplicate request.
Mark it as such. */
@@ -490,7 +490,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
} while (h225ras_call != NULL );
}
else {
- h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, pi->guid, msg_category);
+ h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, &pi->guid, msg_category);
}
/* add link to response frame, if available */
@@ -531,8 +531,8 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* if this is an ACF, ARJ or DCF, DRJ, give guid to tap and make it filterable */
if (msg_category == 3 || msg_category == 5) {
- memcpy(pi->guid, h225ras_call->guid,16);
- proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, 16, pi->guid);
+ pi->guid = h225ras_call->guid;
+ proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, GUID_LEN, &pi->guid);
}
if (h225ras_call->rsp_num == 0) {
diff --git a/asn1/h225/packet-h225-template.h b/asn1/h225/packet-h225-template.h
index a456ce7b69..e2387c5ae5 100644
--- a/asn1/h225/packet-h225-template.h
+++ b/asn1/h225/packet-h225-template.h
@@ -55,7 +55,7 @@ typedef struct _h225_packet_info {
gint msg_tag; /* message tag*/
gint reason; /* reason tag, if available */
guint requestSeqNum; /* request sequence number of ras-message, if available */
- guint8 guid[16]; /* globally unique call id */
+ e_guid_t guid; /* globally unique call id */
gboolean is_duplicate; /* true, if this is a repeated message */
gboolean request_available; /* true, if response matches to a request */
nstime_t delta_time; /* this is the RAS response time delay */
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index 4c3e94033d..d44488088f 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -4173,8 +4173,8 @@ dissect_h225_T_guid(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
#line 450 "h225.cnf"
tvbuff_t *guid_tvb;
- offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,16,16,&guid_tvb);
- tvb_memcpy(guid_tvb,h225_pi->guid,0,tvb_length(guid_tvb));
+ offset = dissect_per_octet_string(tvb,offset,pinfo,tree,hf_index,GUID_LEN,GUID_LEN,&guid_tvb);
+ tvb_memcpy(guid_tvb,(guint8 *)&h225_pi->guid,0,GUID_LEN);
return offset;
@@ -12815,7 +12815,7 @@ static void reset_h225_packet_info(h225_packet_info *pi)
pi->msg_tag = -1;
pi->reason = -1;
pi->requestSeqNum = 0;
- memset(pi->guid,0,16);
+ memset(&pi->guid,0,sizeof pi->guid);
pi->is_duplicate = FALSE;
pi->request_available = FALSE;
pi->is_faststart = FALSE;
@@ -12914,7 +12914,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
and last request occured more than 1800 seconds ago,
we decide that we have a new request */
/* Append new ras call to list */
- h225ras_call = append_h225ras_call(h225ras_call, pinfo, pi->guid, msg_category);
+ h225ras_call = append_h225ras_call(h225ras_call, pinfo, &pi->guid, msg_category);
} else {
/* No, so it's a duplicate request.
Mark it as such. */
@@ -12927,7 +12927,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
} while (h225ras_call != NULL );
}
else {
- h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, pi->guid, msg_category);
+ h225ras_call = new_h225ras_call(&h225ras_call_key, pinfo, &pi->guid, msg_category);
}
/* add link to response frame, if available */
@@ -12968,8 +12968,8 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* if this is an ACF, ARJ or DCF, DRJ, give guid to tap and make it filterable */
if (msg_category == 3 || msg_category == 5) {
- memcpy(pi->guid, h225ras_call->guid,16);
- proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, 16, pi->guid);
+ pi->guid = h225ras_call->guid;
+ proto_tree_add_guid_hidden(tree, hf_h225_guid, tvb, 0, GUID_LEN, &pi->guid);
}
if (h225ras_call->rsp_num == 0) {
diff --git a/epan/dissectors/packet-h225.h b/epan/dissectors/packet-h225.h
index d7b73f64b7..903f4a543d 100644
--- a/epan/dissectors/packet-h225.h
+++ b/epan/dissectors/packet-h225.h
@@ -63,7 +63,7 @@ typedef struct _h225_packet_info {
gint msg_tag; /* message tag*/
gint reason; /* reason tag, if available */
guint requestSeqNum; /* request sequence number of ras-message, if available */
- guint8 guid[16]; /* globally unique call id */
+ e_guid_t guid; /* globally unique call id */
gboolean is_duplicate; /* true, if this is a repeated message */
gboolean request_available; /* true, if response matches to a request */
nstime_t delta_time; /* this is the RAS response time delay */
diff --git a/epan/ftypes/ftype-guid.c b/epan/ftypes/ftype-guid.c
index 6c78fe9cea..08104453c8 100644
--- a/epan/ftypes/ftype-guid.c
+++ b/epan/ftypes/ftype-guid.c
@@ -30,139 +30,138 @@
#include <ftypes-int.h>
#include <epan/guid-utils.h>
-#define GUID_LEN 16
-
static void
guid_fvalue_set(fvalue_t *fv, gpointer value, gboolean already_copied)
{
- fv->value.guid = *(e_guid_t*)value;
+ g_assert(!already_copied);
+ fv->value.guid = *(e_guid_t*)value;
}
static gpointer
value_get(fvalue_t *fv)
{
- return &(fv->value.guid);
+ return &(fv->value.guid);
}
static gboolean
get_guid(char *s, e_guid_t *guid)
{
- size_t i, n;
- char *p, digits[9];
- static const char fmt[] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
-
- n = strlen(s);
- if (n != strlen(fmt))
- return FALSE;
- for (i=0; i<n; i++) {
- if (fmt[i] == 'X') {
- if (!isxdigit((guchar)s[i]))
- return FALSE;
- } else {
- if (s[i] != fmt[i])
- return FALSE;
- }
- }
-
- p = s;
- strncpy(digits, p, 8);
+ size_t i, n;
+ char *p, digits[9];
+ static const char fmt[] = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
+
+ n = strlen(s);
+ if (n != strlen(fmt))
+ return FALSE;
+ for (i=0; i<n; i++) {
+ if (fmt[i] == 'X') {
+ if (!isxdigit((guchar)s[i]))
+ return FALSE;
+ } else {
+ if (s[i] != fmt[i])
+ return FALSE;
+ }
+ }
+
+ p = s;
+ strncpy(digits, p, 8);
digits[8] = '\0';
- guid->data1 = strtoul(digits, NULL, 16);
+ guid->data1 = strtoul(digits, NULL, 16);
p += 9;
- strncpy(digits, p, 4);
+ strncpy(digits, p, 4);
digits[4] = '\0';
- guid->data2 = (guint16)strtoul(digits, NULL, 16);
+ guid->data2 = (guint16)strtoul(digits, NULL, 16);
p += 5;
- strncpy(digits, p, 4);
+ strncpy(digits, p, 4);
digits[4] = '\0';
- guid->data3 = (guint16)strtoul(digits, NULL, 16);
+ guid->data3 = (guint16)strtoul(digits, NULL, 16);
p += 5;
- for (i=0; i < sizeof(guid->data4); i++) {
- if (*p == '-') p++;
- digits[0] = *(p++);
- digits[1] = *(p++);
- digits[2] = '\0';
- guid->data4[i] = (guint8)strtoul(digits, NULL, 16);
- }
- return TRUE;
+ for (i=0; i < sizeof(guid->data4); i++) {
+ if (*p == '-') p++;
+ digits[0] = *(p++);
+ digits[1] = *(p++);
+ digits[2] = '\0';
+ guid->data4[i] = (guint8)strtoul(digits, NULL, 16);
+ }
+ return TRUE;
}
static gboolean
guid_from_unparsed(fvalue_t *fv, char *s, gboolean allow_partial_value _U_, LogFunc logfunc)
{
- e_guid_t guid;
+ e_guid_t guid;
- if (!get_guid(s, &guid)) {
- logfunc("\"%s\" is not a valid GUID.", s);
- return FALSE;
- }
+ if (!get_guid(s, &guid)) {
+ logfunc("\"%s\" is not a valid GUID.", s);
+ return FALSE;
+ }
- fv->value.guid = guid;
- return TRUE;
+ fv->value.guid = guid;
+ return TRUE;
}
static int
guid_repr_len(fvalue_t *fv _U_, ftrepr_t rtype _U_)
{
- return GUID_STR_LEN;
+ return GUID_STR_LEN;
}
static void
guid_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
{
- guid_to_str_buf(&fv->value.guid, buf, GUID_STR_LEN);
+ guid_to_str_buf(&fv->value.guid, buf, GUID_STR_LEN);
}
static gboolean
cmp_eq(fvalue_t *a, fvalue_t *b)
{
- return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) == 0;
+ return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) == 0;
}
static gboolean
cmp_ne(fvalue_t *a, fvalue_t *b)
{
- return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) != 0;
+ return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) != 0;
}
void
ftype_register_guid(void)
{
- static ftype_t guid_type = {
- "GUID", /* name */
- "Globally Unique Identifier", /* pretty_name */
- GUID_LEN, /* wire_size */
- NULL, /* new_value */
- NULL, /* free_value */
- guid_from_unparsed, /* val_from_unparsed */
- NULL, /* val_from_string */
- guid_to_repr, /* val_to_string_repr */
- guid_repr_len, /* len_string_repr */
-
- guid_fvalue_set, /* set_value */
- NULL, /* set_value_integer */
- NULL, /* set_value_integer64 */
- NULL, /* set_value_floating */
-
- value_get, /* get_value */
- NULL, /* get_value_integer */
- NULL, /* get_value_integer64 */
- NULL, /* get_value_floating */
-
- cmp_eq,
- cmp_ne,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /* cmp_matches */
-
- NULL,
- NULL,
- };
-
- ftype_register(FT_GUID, &guid_type);
+ static ftype_t guid_type = {
+ "GUID", /* name */
+ "Globally Unique Identifier", /* pretty_name */
+ GUID_LEN, /* wire_size */
+ NULL, /* new_value */
+ NULL, /* free_value */
+ guid_from_unparsed, /* val_from_unparsed */
+ NULL, /* val_from_string */
+ guid_to_repr, /* val_to_string_repr */
+ guid_repr_len, /* len_string_repr */
+
+ guid_fvalue_set, /* set_value */
+ NULL, /* set_value_integer */
+ NULL, /* set_value_integer64 */
+ NULL, /* set_value_floating */
+
+ value_get, /* get_value */
+ NULL, /* get_value_integer */
+ NULL, /* get_value_integer64 */
+ NULL, /* get_value_floating */
+
+ cmp_eq,
+ cmp_ne,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL, /* cmp_matches */
+
+ NULL,
+ NULL,
+ };
+
+ ftype_register(FT_GUID, &guid_type);
}
diff --git a/epan/guid-utils.h b/epan/guid-utils.h
index d80e2a6458..1448ec4ddb 100644
--- a/epan/guid-utils.h
+++ b/epan/guid-utils.h
@@ -28,6 +28,10 @@
#ifndef __GUID_UTILS_H__
#define __GUID_UTILS_H__
+#define GUID_LEN 16
+
+/* Note: this might be larger than GUID_LEN, so don't overlay data in packets
+ with this. */
typedef struct _e_guid_t {
guint32 data1;
guint16 data2;
diff --git a/epan/h225-persistentdata.c b/epan/h225-persistentdata.c
index f9ae7539a9..4fa043a983 100644
--- a/epan/h225-persistentdata.c
+++ b/epan/h225-persistentdata.c
@@ -75,7 +75,7 @@ h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int
return h225ras_call;
}
-h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, guint8 *guid, int category)
+h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category)
{
h225ras_call_info_key *new_h225ras_call_key;
h225ras_call_t *h225ras_call = NULL;
@@ -96,14 +96,14 @@ h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packe
h225ras_call->responded = FALSE;
h225ras_call->next_call = NULL;
h225ras_call->req_time=pinfo->fd->abs_ts;
- memcpy(h225ras_call->guid, guid,16);
+ h225ras_call->guid=*guid;
/* store it */
g_hash_table_insert(ras_calls[category], new_h225ras_call_key, h225ras_call);
return h225ras_call;
}
-h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, guint8 *guid, int category _U_)
+h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category _U_)
{
h225ras_call_t *h225ras_call = NULL;
@@ -119,7 +119,7 @@ h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pin
h225ras_call->responded = FALSE;
h225ras_call->next_call = NULL;
h225ras_call->req_time=pinfo->fd->abs_ts;
- memcpy(h225ras_call->guid, guid,16);
+ h225ras_call->guid=*guid;
prev_call->next_call = h225ras_call;
return h225ras_call;
diff --git a/epan/h225-persistentdata.h b/epan/h225-persistentdata.h
index aed7972c5f..5defb14874 100644
--- a/epan/h225-persistentdata.h
+++ b/epan/h225-persistentdata.h
@@ -37,7 +37,7 @@
/* Item of ras request list*/
typedef struct _h225ras_call_t {
guint32 requestSeqNum;
- guint8 guid[16];
+ e_guid_t guid;
guint32 req_num; /* frame number request seen */
guint32 rsp_num; /* frame number response seen */
nstime_t req_time; /* arrival time of request */
@@ -54,8 +54,8 @@ typedef struct _h225ras_call_info_key {
/* functions, needed using ras-request and halfcall matching*/
h225ras_call_t * find_h225ras_call(h225ras_call_info_key *h225ras_call_key ,int category);
-h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, guint8 *guid, int category);
-h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, guint8 *guid, int category);
+h225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category);
+h225ras_call_t * append_h225ras_call(h225ras_call_t *prev_call, packet_info *pinfo, e_guid_t *guid, int category);
void h225_init_routine(void); /* init routine, used by ethereal */
diff --git a/gtk/voip_calls.c b/gtk/voip_calls.c
index 73aa105fc0..12c7eee41d 100644
--- a/gtk/voip_calls.c
+++ b/gtk/voip_calls.c
@@ -1319,8 +1319,7 @@ remove_tap_listener_mtp3_calls(void)
/* ***************************TAP for Q931 **********************************/
/****************************************************************************/
void h245_add_to_graph(guint32 new_frame_num);
-#define GUID_LEN 16
-static const guint8 guid_allzero[GUID_LEN] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static const e_guid_t guid_allzero = {0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };
/* defines specific H323 data */
static gchar *q931_calling_number;
@@ -1421,7 +1420,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
/* check if the called number match a LRQ/LCF */
if ( (strcmp(strinfo->to_identity, tmp_listinfo->to_identity)==0)
- && (memcmp(tmp2_h323info->guid, guid_allzero, GUID_LEN) == 0) ){
+ && (memcmp(&tmp2_h323info->guid, &guid_allzero, GUID_LEN) == 0) ){
/* change the call graph to the LRQ/LCF to belong to this call */
strinfo->npackets += change_call_num_graph(tapinfo, tmp_listinfo->call_num, strinfo->call_num);
@@ -1668,7 +1667,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
/* if not guid and RAS and not LRQ, LCF or LRJ return because did not belong to a call */
/* OR, if not guid and is H225 return because doesn't belong to a call */
- if ((memcmp(pi->guid, guid_allzero, GUID_LEN) == 0))
+ if ((memcmp(&pi->guid, &guid_allzero, GUID_LEN) == 0))
if ( ((pi->msg_type == H225_RAS) && ((pi->msg_tag < 18) || (pi->msg_tag > 20))) || (pi->msg_type != H225_RAS) )
return 0;
@@ -1699,7 +1698,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
tmp_listinfo=list->data;
if (tmp_listinfo->protocol == VOIP_H323){
tmp_h323info = tmp_listinfo->prot_info;
- if ( (memcmp(tmp_h323info->guid, guid_allzero, GUID_LEN) != 0) && (memcmp(tmp_h323info->guid, pi->guid,GUID_LEN)==0) ){
+ if ( (memcmp(&tmp_h323info->guid, &guid_allzero, GUID_LEN) != 0) && (memcmp(&tmp_h323info->guid, &pi->guid,GUID_LEN)==0) ){
strinfo = (voip_calls_info_t*)(list->data);
break;
}
@@ -1726,7 +1725,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
strinfo->protocol=VOIP_H323;
strinfo->prot_info=g_malloc(sizeof(h323_calls_info_t));
tmp_h323info = strinfo->prot_info;
- tmp_h323info->guid = (guint8 *) g_memdup(pi->guid,GUID_LEN);
+ tmp_h323info->guid = g_memdup(&pi->guid, sizeof pi->guid);
tmp_h323info->h225SetupAddr.type = AT_NONE;
tmp_h323info->h225SetupAddr.len = 0;
tmp_h323info->h245_list = NULL;
diff --git a/gtk/voip_calls.h b/gtk/voip_calls.h
index 7f260ce42f..e24221cbea 100644
--- a/gtk/voip_calls.h
+++ b/gtk/voip_calls.h
@@ -39,6 +39,7 @@
#include <glib.h>
#include <stdio.h>
#include <epan/address.h>
+#include <epan/guid-utils.h>
/****************************************************************************/
/* defines voip call state */
@@ -100,7 +101,7 @@ typedef struct _h245_address {
/* defines specific H323 data */
typedef struct _h323_calls_info {
- guint8 *guid; /* Call ID to identify a H225 */
+ e_guid_t *guid; /* Call ID to identify a H225 */
GList* h245_list; /* list of H245 Address and ports for tunneling off calls*/
address h225SetupAddr; /* we use the SETUP H225 IP to determine if packets are forward or reverse */
gboolean is_h245;
diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c
index 7b4e154d12..f626c6977a 100644
--- a/gtk/voip_calls_dlg.c
+++ b/gtk/voip_calls_dlg.c
@@ -317,13 +317,12 @@ voip_calls_on_filter (GtkButton *button _U_,
case VOIP_H323:
tmp_h323info = selected_call_fwd->prot_info;
g_string_sprintfa(filter_string_fwd,
- "((h225.guid == %x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x:%x || q931.call_ref == %x:%x || q931.call_ref == %x:%x) ",
- (guint8)tmp_h323info->guid[0], (guint8)tmp_h323info->guid[1], (guint8)tmp_h323info->guid[2],
- (guint8)tmp_h323info->guid[3], (guint8)tmp_h323info->guid[4], (guint8)tmp_h323info->guid[5], (guint8)tmp_h323info->guid[6],
- (guint8)tmp_h323info->guid[7], (guint8)tmp_h323info->guid[8], (guint8)tmp_h323info->guid[9], (guint8)tmp_h323info->guid[10],
- (guint8)tmp_h323info->guid[11], (guint8)tmp_h323info->guid[12], (guint8)tmp_h323info->guid[13], (guint8)tmp_h323info->guid[14],
- (guint8)tmp_h323info->guid[15], (guint8)(tmp_h323info->q931_crv & 0xff), (guint8)((tmp_h323info->q931_crv & 0xff00)>>8)
- , (guint8)(tmp_h323info->q931_crv2 & 0xff), (guint8)((tmp_h323info->q931_crv2 & 0xff00)>>8));
+ "((h225.guid == %s || q931.call_ref == %x:%x || q931.call_ref == %x:%x) ",
+ guid_to_str(&tmp_h323info->guid[0]),
+ (guint8)(tmp_h323info->q931_crv & 0xff),
+ (guint8)((tmp_h323info->q931_crv & 0xff00)>>8),
+ (guint8)(tmp_h323info->q931_crv2 & 0xff),
+ (guint8)((tmp_h323info->q931_crv2 & 0xff00)>>8));
list = g_list_first(tmp_h323info->h245_list);
while (list)
{