--- innwebd/innd.cpp 2004/07/04 08:04:08 1.7 +++ innwebd/innd.cpp 2008/04/11 17:14:49 1.13 @@ -1,14 +1,10 @@ /*******************************************************/ /* */ /* LeafOK Innbbsd */ -/* Copyright (C) LeafOK.com, 2003-2004 */ /* */ -/* Programmed by Leaf */ -/* E-mail:leaflet@leafok.com QQ:6049044 */ +/* Copyright (C) LeafOK.com, 2003-2008 */ /* */ -/* http://bbs.leafok.com */ -/* http://bbs.leafok.net */ -/* http://bbs.fenglin.info */ +/* http://www.leafok.com */ /* */ /*******************************************************/ @@ -124,7 +120,9 @@ int innd::Accept(void) } catch(CException* e) { - syslog << logfile::log_head << "Error in accept()" << endl; + char strErrMsg[1024]; + e->GetErrorMessage(strErrMsg,1024); + syslog << logfile::log_head << "Error in accept() [" << strErrMsg << "]" << endl; e->Delete(); return -1; } @@ -156,8 +154,8 @@ int innd::cmd_list(void) sql = "select * from innd_conf order by `group`"; - RS.Open(CRecordset::snapshot,sql,CRecordst::forwardOnly | CRecordset::readOnly); - while(!RS.IsEEOF()) + RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); + while(!RS.IsEOF()) { RS.GetFieldValue("group",dbVar,SQL_C_CHAR); group = *(dbVar.m_pstring); @@ -175,7 +173,9 @@ int innd::cmd_list(void) } catch(CException* e) { - syslog << logfile::log_head << "Error in cmd_list()" << endl; + char strErrMsg[1024]; + e->GetErrorMessage(strErrMsg,1024); + syslog << logfile::log_head << "Error in cmd_list() [" << strErrMsg << "]" << endl; e->Delete(); return -1; } @@ -355,8 +355,8 @@ int innd::cmd_ihave(const char* msg_id) } catch(CException* e) { - char strErrMsg[256]; - e->GetErrorMessage(strErrMsg,256); + char strErrMsg[1024]; + e->GetErrorMessage(strErrMsg,1024); syslog << logfile::log_head << "Error in cmd_ihave() [" << strErrMsg << "]" << endl; e->Delete(); return -1; @@ -398,3 +398,8 @@ int innd::db_env_init(void) } return 0; } + +bool innd::check_priv(void) +{ + return this->access.get; +}