From 0501ea80ca9657c16300787fb7b6a01feec2bad8 Mon Sep 17 00:00:00 2001
From: piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>
Date: Mon, 16 Apr 2012 10:11:11 +0000
Subject: Change banip address type to in_addr_t.

git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5662 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
---
 pttbbs/UPDATING           | 5 +++++
 pttbbs/common/bbs/banip.c | 2 +-
 pttbbs/include/cmbbs.h    | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pttbbs/UPDATING b/pttbbs/UPDATING
index f8170027..a0747cc4 100644
--- a/pttbbs/UPDATING
+++ b/pttbbs/UPDATING
@@ -23,6 +23,11 @@ https://opensvn.csie.org/traccgi/pttbbs/changeset/2273
     make r4871_uflag
 
 -----------------------------------------------------------------------------
+r5662: [banip]
+banip �� record size �� unsigned long �אּ in_addr_t.
+�b 64-bit ���ҤW�ϥΪ��H�Х��� (common, util, mbbsd) make clean �A make all.
+~bbs/tmp/banip.cache �]�n�O�o�屼���ءC
+
 r5653: [banip]
 util/banip.pl �� include/banip.h ��� etc/banip.conf ���N�A�H��[ banip ����
 �A���s�sĶ�{���A�u�n�ק� banip.conf �í��� bbs (bbsctl restart) �Y�i�C
diff --git a/pttbbs/common/bbs/banip.c b/pttbbs/common/bbs/banip.c
index dc27a9e0..81d39a14 100644
--- a/pttbbs/common/bbs/banip.c
+++ b/pttbbs/common/bbs/banip.c
@@ -22,7 +22,7 @@ static const char *str_banned = "YOUR ARE USING A BANNED IP.\n\r";
 
 typedef struct {
     IPv4 addr;
-    size_t msg_offset;
+    uint32_t msg_offset;
 } BanRecord;
 
 typedef struct {
diff --git a/pttbbs/include/cmbbs.h b/pttbbs/include/cmbbs.h
index 762009c8..4b5b4012 100644
--- a/pttbbs/include/cmbbs.h
+++ b/pttbbs/include/cmbbs.h
@@ -43,7 +43,7 @@ int log_payment(const char *filename, int money, int oldm, int newm,
                        const char *reason, time4_t now);
 
 /* banip.c */
-typedef unsigned long IPv4;     // derived from in_addr.s_addr
+typedef in_addr_t IPv4;     // derived from in_addr.s_addr
 typedef void BanIpList;
 const char *in_banip_list(const BanIpList *list, const char *ip);
 const char *in_banip_list_addr(const BanIpList *list, IPv4 addr);
-- 
cgit v1.2.3