summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-05 15:50:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-05 15:50:22 +0800
commitf8444da45898bfc9cc19c82395e3277506695995 (patch)
treea72af0a26604a0980046e448a9b350909f52cbbf
parent4413a508ce712d881bcd0d92d667b1a0b507a17d (diff)
downloadpttbbs-f8444da45898bfc9cc19c82395e3277506695995.tar
pttbbs-f8444da45898bfc9cc19c82395e3277506695995.tar.gz
pttbbs-f8444da45898bfc9cc19c82395e3277506695995.tar.bz2
pttbbs-f8444da45898bfc9cc19c82395e3277506695995.tar.lz
pttbbs-f8444da45898bfc9cc19c82395e3277506695995.tar.xz
pttbbs-f8444da45898bfc9cc19c82395e3277506695995.tar.zst
pttbbs-f8444da45898bfc9cc19c82395e3277506695995.zip
Add missing 'type' field
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5913 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-xpttbbs/daemon/commentd/commentd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pttbbs/daemon/commentd/commentd.py b/pttbbs/daemon/commentd/commentd.py
index 30cf13bf..1c3a79d6 100755
--- a/pttbbs/daemon/commentd/commentd.py
+++ b/pttbbs/daemon/commentd/commentd.py
@@ -20,7 +20,7 @@ COMMENTLEN = 80
# Ref: ../../include/daemons.h
RequestFormatString = 'HH';
Request = collections.namedtuple('Request', 'cb operation')
-CommentFormatString = "III%ds%ds" % (IDLEN + 1, COMMENTLEN + 1)
+CommentFormatString = "IIII%ds%ds" % (IDLEN + 1, COMMENTLEN + 1)
Comment = collections.namedtuple('Comment',
'time ipv4 userref type userid msg')
CommentKeyFormatString = '%ds%ds' % (IDLEN + 1, FNLEN + 1)
@@ -29,7 +29,9 @@ REQ_ADD = 1
REQ_QUERY = 2
_SERVER_ADDR = '127.0.0.1'
_SERVER_PORT = 5134
-_DB_PATH = './db_comments.db'
+_DB_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+ 'db_comments.db')
+
def UnpackComment(blob):
def strip_if_string(v):