openbsd-ports/x11/gnome/vfs2/patches/patch-libgnomevfs-gnome-vfs-dns-sd_c
marcm 39e8749e89 Update to their GNOME 2.8.2 versions:
metacity        2.8.6 -> 2.8.8
gnome-mime-data 2.4.1 -> 2.4.2
nautilus        2.8.1 -> 2.8.2
gnome-panel     2.8.1 -> 2.8.2
gnome-terminal  2.8.0 -> 2.8.2
gnome-vfs2      2.8.2 -> 2.8.3
yelp            2.6.4 -> 2.6.5

GNOME 2.8.2 was announced right before I committed 2.8.1, sheesh.
2004-12-14 01:14:44 +00:00

128 lines
3.7 KiB
Plaintext

--- libgnomevfs/gnome-vfs-dns-sd.c.orig Tue Sep 21 01:05:42 2004
+++ libgnomevfs/gnome-vfs-dns-sd.c Sun Dec 12 16:24:37 2004
@@ -60,7 +60,7 @@ typedef struct {
} dns_message_header;
typedef struct {
- char name[NS_MAXDNAME];
+ char name[MAXDNAME];
guint16 type;
guint16 class;
guint32 ttl;
@@ -225,7 +225,7 @@ parse_header (char *reply, int reply_len
unsigned char *p,
dns_message_header *header)
{
- if (reply_len < NS_HFIXEDSZ)
+ if (reply_len < HFIXEDSZ)
return -1;
header->id = decode_16 (p); p += 2;
@@ -235,7 +235,7 @@ parse_header (char *reply, int reply_len
header->nscount = decode_16 (p); p += 2;
header->arcount = decode_16 (p); p += 2;
- return NS_HFIXEDSZ;
+ return HFIXEDSZ;
}
@@ -308,7 +308,7 @@ unicast_list_domains_sync (const char *d
unsigned char reply[DNS_REPLY_SIZE];
unsigned char *p;
char *searchdomain;
- char name[NS_MAXDNAME];
+ char name[MAXDNAME];
dns_message_header header;
dns_message_rr rr;
int res;
@@ -324,7 +324,7 @@ unicast_list_domains_sync (const char *d
/* Use TCP to support large queries */
_res.options |= RES_USEVC;
searchdomain = g_strconcat ("_browse._dns-sd._udp.", domain, NULL);
- reply_len = res_search (searchdomain, ns_c_in, ns_t_ptr,
+ reply_len = res_search (searchdomain, C_IN, T_PTR,
reply, sizeof (reply));
g_free (searchdomain);
if (reply_len == -1) {
@@ -368,7 +368,7 @@ unicast_list_domains_sync (const char *d
goto error;
p += len;
- if (rr.type == ns_t_ptr) {
+ if (rr.type == T_PTR) {
len = dn_expand (reply, reply + reply_len, p, name, sizeof(name));
if (len < 0)
goto error;
@@ -419,7 +419,7 @@ unicast_browse_sync (const char *domain,
unsigned char reply[DNS_REPLY_SIZE];
unsigned char *p;
char *searchdomain;
- char name[NS_MAXDNAME];
+ char name[MAXDNAME];
dns_message_header header;
dns_message_rr rr;
GArray *array;
@@ -436,7 +436,7 @@ unicast_browse_sync (const char *domain,
/* Use TCP to support large queries */
_res.options |= RES_USEVC;
searchdomain = g_strconcat (type, ".", domain, NULL);
- reply_len = res_search (searchdomain, ns_c_in, ns_t_ptr,
+ reply_len = res_search (searchdomain, C_IN, T_PTR,
reply, sizeof (reply));
g_free (searchdomain);
if (reply_len == -1) {
@@ -482,11 +482,12 @@ unicast_browse_sync (const char *domain,
goto error;
p += len;
- if (rr.type == ns_t_ptr) {
+ if (rr.type == T_PTR) {
GnomeVFSDNSSDService service;
- char ptr_service[NS_MAXDNAME];
- char ptr_type[NS_MAXDNAME];
- char ptr_domain[NS_MAXDNAME];
+
+ char ptr_service[MAXDNAME];
+ char ptr_type[MAXDNAME];
+ char ptr_domain[MAXDNAME];
len = dn_expand (reply, reply + reply_len, p, name, sizeof(name));
if (len < 0)
@@ -580,7 +581,7 @@ unicast_resolve_sync (const char *name,
int reply_len, len, i;
unsigned char reply[DNS_REPLY_SIZE];
unsigned char *p;
- char dnsname[NS_MAXDNAME];
+ char dnsname[MAXDNAME];
dns_message_header header;
dns_message_rr rr;
char *full_name;
@@ -600,7 +601,7 @@ unicast_resolve_sync (const char *name,
_res.options |= RES_USEVC;
full_name = service_to_dns_name (name, type, domain);
- reply_len = res_search (full_name, ns_c_in, ns_t_any,
+ reply_len = res_search (full_name, C_IN, T_ANY,
reply, sizeof (reply));
g_free (full_name);
if (reply_len == -1) {
@@ -644,7 +645,7 @@ unicast_resolve_sync (const char *name,
goto error;
p += len;
- if (rr.type == ns_t_srv) {
+ if (rr.type == T_SRV) {
unsigned char *pp;
int priority, weight, port;
@@ -665,7 +666,7 @@ unicast_resolve_sync (const char *name,
}
}
- if (rr.type == ns_t_txt) {
+ if (rr.type == T_TXT) {
*text_raw_out = g_memdup (p, rr.rdlength);
*text_raw_len_out = rr.rdlength;
}