changeset 16907:533ebd404184

Change the nat-pmp code to use glib's integer types instead of those from stdint.h. Also, remove the err.h #include which doesn't seem to be needed.
author Richard Laager <rlaager@wiktel.com>
date Sat, 05 May 2007 14:50:00 +0000
parents b93b9994dc2f
children d0e74d0be43f
files libpurple/nat-pmp.c libpurple/nat-pmp.h
diffstat 2 files changed, 19 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/nat-pmp.c	Sat May 05 19:15:44 2007 +0000
+++ b/libpurple/nat-pmp.c	Sat May 05 14:50:00 2007 +0000
@@ -44,7 +44,6 @@
 #include <net/route.h>
 
 #include <netdb.h>
-#include <err.h>
 #endif
 
 #include <stdio.h>
@@ -58,35 +57,35 @@
 #define PMP_DEBUG	1
 
 typedef struct {
-	uint8_t	version;
-	uint8_t opcode;
+	guint8	version;
+	guint8 opcode;
 } PurplePmpIpRequest;
 
 typedef struct {
-	uint8_t		version;
-	uint8_t		opcode; /* 128 + n */
-	uint16_t	resultcode;
-	uint32_t	epoch;
-	uint32_t	address;
+	guint8		version;
+	guint8		opcode; /* 128 + n */
+	guint16		resultcode;
+	guint32		epoch;
+	guint32		address;
 } PurplePmpIpResponse;
 
 typedef struct {
-	uint8_t		version;
-	uint8_t		opcode;
+	guint8		version;
+	guint8		opcode;
 	char		reserved[2];
-	uint16_t	privateport;
-	uint16_t	publicport;
-	uint32_t	lifetime;
+	guint16		privateport;
+	guint16		publicport;
+	guint32		lifetime;
 } PurplePmpMapRequest;
 
 struct _PurplePmpMapResponse {
-	uint8_t		version;
-	uint8_t		opcode;
-	uint16_t	resultcode;
-	uint32_t	epoch;
-	uint16_t	privateport;
-	uint16_t	publicport;
-	uint32_t	lifetime;
+	guint8		version;
+	guint8		opcode;
+	guint16		resultcode;
+	guint32		epoch;
+	guint16		privateport;
+	guint16		publicport;
+	guint32		lifetime;
 };
 
 typedef struct _PurplePmpMapResponse PurplePmpMapResponse;
--- a/libpurple/nat-pmp.h	Sat May 05 19:15:44 2007 +0000
+++ b/libpurple/nat-pmp.h	Sat May 05 14:50:00 2007 +0000
@@ -31,7 +31,6 @@
 #ifndef _PURPLE_NAT_PMP_H
 #define _PURPLE_NAT_PMP_H
 
-#include <stdint.h>
 #include <glib.h>
 
 #define PURPLE_PMP_LIFETIME	3600	/* 3600 seconds */