/[LeafOK_CVS]/lbbs/src/article_view_log.c
ViewVC logotype

Diff of /lbbs/src/article_view_log.c

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

Revision 1.3 by sysadm, Sat Jun 7 10:00:10 2025 UTC Revision 1.5 by sysadm, Mon Jun 16 14:30:44 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
17    #define _XOPEN_SOURCE 500
18    #define _POSIX_C_SOURCE 200809L
19    
20  #include "article_view_log.h"  #include "article_view_log.h"
21  #include "log.h"  #include "log.h"
22  #include "common.h"  #include "common.h"
23  #include "database.h"  #include "database.h"
24  #include <stdlib.h>  #include <stdlib.h>
   
 #define _XOPEN_SOURCE 500  
 #define _POSIX_C_SOURCE 200809L  
25  #include <string.h>  #include <string.h>
26    
27  ARTICLE_VIEW_LOG BBS_article_view_log;  ARTICLE_VIEW_LOG BBS_article_view_log;
# Line 123  int article_view_log_unload(ARTICLE_VIEW Line 123  int article_view_log_unload(ARTICLE_VIEW
123    
124  int article_view_log_save_inc(const ARTICLE_VIEW_LOG *p_view_log)  int article_view_log_save_inc(const ARTICLE_VIEW_LOG *p_view_log)
125  {  {
126          MYSQL *db;          MYSQL *db = NULL;
127          char sql[SQL_BUFFER_LEN];          char sql[SQL_BUFFER_LEN];
128          char tuple_tmp[LINE_BUFFER_LEN];          char tuple_tmp[LINE_BUFFER_LEN];
129          int i;          int i;
# Line 161  int article_view_log_save_inc(const ARTI Line 161  int article_view_log_save_inc(const ARTI
161                          if (mysql_query(db, sql) != 0)                          if (mysql_query(db, sql) != 0)
162                          {                          {
163                                  log_error("Add view_article_log error: %s\n", mysql_error(db));                                  log_error("Add view_article_log error: %s\n", mysql_error(db));
164                                    mysql_close(db);
165                                  return -3;                                  return -3;
166                          }                          }
167    


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

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