/[LeafOK_CVS]/innwebd/base_active.cpp
ViewVC logotype

Diff of /innwebd/base_active.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 by sysadm, Thu Nov 17 15:31:50 2005 UTC Revision 1.9 by sysadm, Fri Apr 11 17:14:49 2008 UTC
# Line 1  Line 1 
1  /*******************************************************/  /*******************************************************/
2  /*                                                     */  /*                                                     */
3  /*  LeafOK Innbbsd                                     */  /*  LeafOK Innbbsd                                     */
 /*  Copyright (C) LeafOK.com, 2003-2005                */  
4  /*                                                     */  /*                                                     */
5  /*  Programmed by Leaf                                 */  /*  Copyright (C) LeafOK.com, 2003-2008                */
 /*  E-mail:leaflet@leafok.com  QQ:6049044              */  
6  /*                                                     */  /*                                                     */
7  /*  http://bbs.leafok.com                              */  /*  http://www.leafok.com                              */
 /*  http://bbs.leafok.net                              */  
 /*  http://bbs.fenglin.info                            */  
8  /*                                                     */  /*                                                     */
9  /*******************************************************/  /*******************************************************/
10    
# Line 269  int base_active::get_article(const char* Line 265  int base_active::get_article(const char*
265          }          }
266          catch(CException* e)          catch(CException* e)
267          {          {
268                  syslog << logfile::log_head << "[" << news_server << "] Getting article error in get_article()" << endl;                  char strErrMsg[1024];
269                    e->GetErrorMessage(strErrMsg,1024);
270                    syslog << logfile::log_head << "[" << news_server << "] Getting article error in get_article() [" << strErrMsg << "]" << endl;
271                  e->Delete();                  e->Delete();
272                  return -1;                  return -1;
273          }          }
# Line 510  int base_active::get_cancel(const char* Line 508  int base_active::get_cancel(const char*
508          }          }
509          catch(CException* e)          catch(CException* e)
510          {          {
511                  syslog << logfile::log_head << "[" << news_server << "] Getting article error in get_article()" << endl;                  char strErrMsg[1024];
512                    e->GetErrorMessage(strErrMsg,1024);
513                    syslog << logfile::log_head << "[" << news_server << "] Getting article error in get_article() [" << strErrMsg << "]" << endl;
514                  e->Delete();                  e->Delete();
515                  return -1;                  return -1;
516          }          }
# Line 573  int base_active::post_article(const char Line 573  int base_active::post_article(const char
573                                  sql.Format("delete from innd_todo where ID=%ld",id);                                  sql.Format("delete from innd_todo where ID=%ld",id);
574                                  this->Db.ExecuteSQL(sql);                                  this->Db.ExecuteSQL(sql);
575    
576                                  syslog << logfile::log_head << "[" << news_server << "] Post failed " << msg_id << endl;                                  syslog << logfile::log_head << "[" << news_server << "] Post failed " << msg_id << " [" << out << "]" << endl;
577    
578                                  RS.MoveNext();                                  RS.MoveNext();
579                                  continue;                                  continue;
# Line 631  int base_active::post_article(const char Line 631  int base_active::post_article(const char
631          }          }
632          catch(CException* e)          catch(CException* e)
633          {          {
634                  syslog << logfile::log_head << "[" << news_server << "] Getting article error in post_article()" << endl;                  char strErrMsg[1024];
635                    e->GetErrorMessage(strErrMsg,1024);
636                    syslog << logfile::log_head << "[" << news_server << "] Getting article error in post_article() [" << strErrMsg << "]" << endl;
637                  e->Delete();                  e->Delete();
638                  return -1;                  return -1;
639          }          }
# Line 690  int base_active::post_cancel(const char* Line 692  int base_active::post_cancel(const char*
692                                  sql.Format("delete from innd_todo where ID=%ld",id);                                  sql.Format("delete from innd_todo where ID=%ld",id);
693                                  this->Db.ExecuteSQL(sql);                                  this->Db.ExecuteSQL(sql);
694    
695                                  syslog << logfile::log_head << "[" << news_server << "] Post failed " << msg_id << endl;                                  syslog << logfile::log_head << "[" << news_server << "] Post failed " << msg_id << " [" << out << "]" << endl;
696    
697                                  RS.MoveNext();                                  RS.MoveNext();
698                                  continue;                                  continue;
# Line 732  int base_active::post_cancel(const char* Line 734  int base_active::post_cancel(const char*
734          }          }
735          catch(CException* e)          catch(CException* e)
736          {          {
737                  syslog << logfile::log_head << "[" << news_server << "] Getting article error in post_cancel()" << endl;                  char strErrMsg[1024];
738                    e->GetErrorMessage(strErrMsg,1024);
739                    syslog << logfile::log_head << "[" << news_server << "] Getting article error in post_cancel() [" << strErrMsg << "]" << endl;
740                  e->Delete();                  e->Delete();
741                  return -1;                  return -1;
742          }          }
# Line 827  int base_active::get(void) Line 831  int base_active::get(void)
831          }          }
832          catch(CException* e)          catch(CException* e)
833          {          {
834                  syslog << logfile::log_head << "Error in get()" << endl;                  char strErrMsg[1024];
835                    e->GetErrorMessage(strErrMsg,1024);
836                    syslog << logfile::log_head << "Error in get() [" << strErrMsg << "]" << endl;
837                  e->Delete();                  e->Delete();
838                  return -1;                  return -1;
839          }          }
# Line 894  int base_active::post(void) Line 900  int base_active::post(void)
900          }          }
901          catch(CException* e)          catch(CException* e)
902          {          {
903                  syslog << logfile::log_head << "Error in post()" << endl;                  char strErrMsg[1024];
904                    e->GetErrorMessage(strErrMsg,1024);
905                    syslog << logfile::log_head << "Error in post() [" << strErrMsg << "]" << endl;
906                  e->Delete();                  e->Delete();
907                  return -1;                  return -1;
908          }          }
# Line 954  int base_active::ihave_article(const cha Line 962  int base_active::ihave_article(const cha
962    
963                          if (out.Left(3) != "335")                          if (out.Left(3) != "335")
964                          {                          {
965                                  sql.Format("delete from innd_todo where ID=%ld",id);                                  if (out.Left(3) == "435")
966                                  this->Db.ExecuteSQL(sql);                                  {
967                                            sql.Format("delete from innd_todo where ID=%ld",id);
968                                            this->Db.ExecuteSQL(sql);
969                                    }
970    
971                                  syslog << logfile::log_head << "[" << news_server << "] Ihave failed " << msg_id << endl;                                  syslog << logfile::log_head << "[" << news_server << "] Ihave failed " << msg_id << " [" << out << "]" << endl;
972    
973                                  RS.MoveNext();                                  RS.MoveNext();
974                                  continue;                                  continue;
# Line 1022  int base_active::ihave_article(const cha Line 1033  int base_active::ihave_article(const cha
1033          }          }
1034          catch(CException* e)          catch(CException* e)
1035          {          {
1036                  syslog << logfile::log_head << "[" << news_server << "] Getting article error in ihave_article()" << endl;                  char strErrMsg[1024];
1037                    e->GetErrorMessage(strErrMsg,1024);
1038                    syslog << logfile::log_head << "[" << news_server << "] Getting article error in ihave_article() [" << strErrMsg << "]" << endl;
1039                  e->Delete();                  e->Delete();
1040                  return -1;                  return -1;
1041          }          }
# Line 1078  int base_active::ihave_cancel(const char Line 1091  int base_active::ihave_cancel(const char
1091    
1092                          if (out.Left(3) != "335")                          if (out.Left(3) != "335")
1093                          {                          {
1094                                  sql.Format("delete from innd_todo where ID=%ld",id);                                  if (out.Left(3) == "435")
1095                                  this->Db.ExecuteSQL(sql);                                  {
1096                                            sql.Format("delete from innd_todo where ID=%ld",id);
1097                                            this->Db.ExecuteSQL(sql);
1098                                    }
1099    
1100                                  syslog << logfile::log_head << "[" << news_server << "] Ihave failed " << msg_id << endl;                                  syslog << logfile::log_head << "[" << news_server << "] Ihave failed " << msg_id << " [" << out << "]" <<endl;
1101    
1102                                  RS.MoveNext();                                  RS.MoveNext();
1103                                  continue;                                  continue;
# Line 1130  int base_active::ihave_cancel(const char Line 1146  int base_active::ihave_cancel(const char
1146          }          }
1147          catch(CException* e)          catch(CException* e)
1148          {          {
1149                  syslog << logfile::log_head << "[" << news_server << "] Getting article error in ihave_cancel()" << endl;                  char strErrMsg[1024];
1150                    e->GetErrorMessage(strErrMsg,1024);
1151                    syslog << logfile::log_head << "[" << news_server << "] Getting article error in ihave_cancel() [" << strErrMsg << "]" << endl;
1152                  e->Delete();                  e->Delete();
1153                  return -1;                  return -1;
1154          }          }
# Line 1196  int base_active::ihave(void) Line 1214  int base_active::ihave(void)
1214          }          }
1215          catch(CException* e)          catch(CException* e)
1216          {          {
1217                  syslog << logfile::log_head << "Error in ihave()" << endl;                  char strErrMsg[1024];
1218                    e->GetErrorMessage(strErrMsg,1024);
1219                    syslog << logfile::log_head << "Error in ihave() [" << strErrMsg << "]" << endl;
1220                  e->Delete();                  e->Delete();
1221                  return -1;                  return -1;
1222          }          }
# Line 1233  bool base_active::check_todo_list(void) Line 1253  bool base_active::check_todo_list(void)
1253          }          }
1254          catch(CException* e)          catch(CException* e)
1255          {          {
1256                  syslog << logfile::log_head << "Error in check_todo_list()" << endl;                  char strErrMsg[1024];
1257                    e->GetErrorMessage(strErrMsg,1024);
1258                    syslog << logfile::log_head << "Error in check_todo_list() [" << strErrMsg << "]" << endl;
1259                  e->Delete();                  e->Delete();
1260                  return false;                  return false;
1261          }          }
# Line 1275  DWORD base_active::SendThread(LPVOID pPa Line 1297  DWORD base_active::SendThread(LPVOID pPa
1297          }          }
1298          catch(CException* e)          catch(CException* e)
1299          {          {
1300                  syslog << logfile::log_head << "Error in SendThread()" << endl;                  char strErrMsg[1024];
1301                    e->GetErrorMessage(strErrMsg,1024);
1302                    syslog << logfile::log_head << "Error in SendThread() [" << strErrMsg << "]" << endl;
1303                  e->Delete();                  e->Delete();
1304                  return -1;                  return -1;
1305          }          }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1