From 507da2e1fd914e78a2d5a775cdfc79f44d014c11 Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 12 Apr 2012 15:56:10 +0000 Subject: revise brcstored. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5629 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/daemon/brcstored/brcstored.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pttbbs/daemon/brcstored/brcstored.py b/pttbbs/daemon/brcstored/brcstored.py index 9df59c26..fd4d3bc2 100755 --- a/pttbbs/daemon/brcstored/brcstored.py +++ b/pttbbs/daemon/brcstored/brcstored.py @@ -1,4 +1,12 @@ #!/usr/bin/env python +# Copyright (c) 2012 Hung-Te Lin . All rights reserved. +# Use of this source code is governed by a BSD license. + +""" +brcstored: Board RC (brc) storage daemon. + +Provides a way to manage per-user BRC object into isolated database. +""" import StringIO import logging @@ -11,7 +19,7 @@ import struct _SERVER_ADDR = '127.0.0.1' _SERVER_PORT = 5133 -_DB_PATH = '/home/bbs/brcstore/db' +_DB_PATH = '/home/bbs/brcstore/database' def get_data(uid): @@ -54,7 +62,7 @@ def handle_request(sock, fd): logging.info('Write: %s: size=%d', uid, len(msg)) put_data(uid, msg) else: - raise ValueError('Unknown request: 0x%02X' % command) + raise ValueError('Unknown request: 0x%02X' % ord(command)) except: logging.exception("handle_request") finally: -- cgit v1.2.3