squelch some compiler warnings
svn path=/trunk/; revision=19052
This commit is contained in:
parent
8ed01f4cb7
commit
36d80b8c8b
|
@ -992,7 +992,7 @@ extern void radius_register_avp_dissector(guint32 vendor_id, guint32 attribute_i
|
|||
vendor->ett = no_vendor.ett;
|
||||
|
||||
g_hash_table_insert(dict->vendors_by_id,GUINT_TO_POINTER(vendor->code),vendor);
|
||||
g_hash_table_insert(dict->vendors_by_name,vendor->name,vendor);
|
||||
g_hash_table_insert(dict->vendors_by_name,(gpointer)(vendor->name),vendor);
|
||||
}
|
||||
|
||||
dictionary_entry = g_hash_table_lookup(vendor->attrs_by_id,GUINT_TO_POINTER(attribute_id));
|
||||
|
|
|
@ -155,8 +155,8 @@ dissect_rmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
static int
|
||||
dissect_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
proto_tree *rsp_tree = NULL, *field_tree;
|
||||
proto_item *ti, *tf;
|
||||
proto_tree *rsp_tree = NULL/*, *field_tree*/;
|
||||
proto_item *ti/*, *tf*/;
|
||||
tvbuff_t *next_tvb;
|
||||
int offset = 0;
|
||||
|
||||
|
|
|
@ -43,6 +43,44 @@
|
|||
static emem_tree_t *guid_to_name_tree = NULL;
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/* try to resolve an DCE/RPC interface name to it's name using the Windows registry entries */
|
||||
/* XXX - might be better to fill all interfaces into our database at startup instead of searching each time */
|
||||
int
|
||||
ResolveWin32UUID(e_guid_t if_id, char *uuid_name, int uuid_name_max_len)
|
||||
{
|
||||
TCHAR *reg_uuid_name;
|
||||
HKEY hKey = NULL;
|
||||
DWORD uuid_max_size = MAX_PATH;
|
||||
TCHAR *reg_uuid_str;
|
||||
|
||||
reg_uuid_name=ep_alloc(MAX_PATH*sizeof(TCHAR));
|
||||
reg_uuid_str=ep_alloc(MAX_PATH*sizeof(TCHAR));
|
||||
|
||||
if(uuid_name_max_len < 2){
|
||||
return 0;
|
||||
}
|
||||
reg_uuid_name[0] = '\0';
|
||||
_snwprintf(reg_uuid_str, MAX_PATH, _T("SOFTWARE\\Classes\\Interface\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"),
|
||||
if_id.data1, if_id.data2, if_id.data3,
|
||||
if_id.data4[0], if_id.data4[1],
|
||||
if_id.data4[2], if_id.data4[3],
|
||||
if_id.data4[4], if_id.data4[5],
|
||||
if_id.data4[6], if_id.data4[7]);
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_uuid_str, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
|
||||
if (RegQueryValueEx(hKey, NULL, NULL, NULL, (LPBYTE)reg_uuid_name, &uuid_max_size) == ERROR_SUCCESS && uuid_max_size <= MAX_PATH) {
|
||||
g_snprintf(uuid_name, uuid_name_max_len, "%s", utf_16to8(reg_uuid_name));
|
||||
RegCloseKey(hKey);
|
||||
return strlen(uuid_name);
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
return 0; /* we didn't find anything anyhow. Please don't use the string! */
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* store a guid to name mapping */
|
||||
void
|
||||
guids_add_guid(e_guid_t *guid, const gchar *name)
|
||||
|
@ -142,46 +180,6 @@ guids_init(void)
|
|||
}
|
||||
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/* try to resolve an DCE/RPC interface name to it's name using the Windows registry entries */
|
||||
/* XXX - might be better to fill all interfaces into our database at startup instead of searching each time */
|
||||
int
|
||||
ResolveWin32UUID(e_guid_t if_id, char *uuid_name, int uuid_name_max_len)
|
||||
{
|
||||
TCHAR *reg_uuid_name;
|
||||
HKEY hKey = NULL;
|
||||
DWORD uuid_max_size = MAX_PATH;
|
||||
TCHAR *reg_uuid_str;
|
||||
|
||||
reg_uuid_name=ep_alloc(MAX_PATH*sizeof(TCHAR));
|
||||
reg_uuid_str=ep_alloc(MAX_PATH*sizeof(TCHAR));
|
||||
|
||||
if(uuid_name_max_len < 2){
|
||||
return 0;
|
||||
}
|
||||
reg_uuid_name[0] = '\0';
|
||||
_snwprintf(reg_uuid_str, MAX_PATH, _T("SOFTWARE\\Classes\\Interface\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"),
|
||||
if_id.data1, if_id.data2, if_id.data3,
|
||||
if_id.data4[0], if_id.data4[1],
|
||||
if_id.data4[2], if_id.data4[3],
|
||||
if_id.data4[4], if_id.data4[5],
|
||||
if_id.data4[6], if_id.data4[7]);
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_uuid_str, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) {
|
||||
if (RegQueryValueEx(hKey, NULL, NULL, NULL, (LPBYTE)reg_uuid_name, &uuid_max_size) == ERROR_SUCCESS && uuid_max_size <= MAX_PATH) {
|
||||
g_snprintf(uuid_name, uuid_name_max_len, "%s", utf_16to8(reg_uuid_name));
|
||||
RegCloseKey(hKey);
|
||||
return strlen(uuid_name);
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
return 0; /* we didn't find anything anyhow. Please don't use the string! */
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Tries to match a guid against its name.
|
||||
Returns the associated string ptr on a match.
|
||||
Formats uuid number and returns the resulting string, if name is unknown.
|
||||
|
|
|
@ -210,7 +210,7 @@ static void clear_node_pr(stat_node* n) {
|
|||
}
|
||||
#else
|
||||
if (n->pr->node) {
|
||||
gtk_ctree_remove_node(n->st->pr->ctree,n->pr->node);
|
||||
gtk_ctree_remove_node(GKT_CTREE(n->st->pr->ctree),n->pr->node);
|
||||
n->pr->node = NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue