Ignore:
Timestamp:
Apr 30, 2008, 11:56:45 PM (16 years ago)
Author:
katerina
Message:

Plenty of compiler warnings fixed, SQL query length fixed, doc update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_database.c

    r116 r170  
    6161  char            msg[1024];
    6262  char            sev[8];
    63   char            path[12288];
     63  char            path[MAX_PATH_STORE+1];
    6464  char            user[9];
    6565  char            group[9];
     
    8282  char            interface[64];   
    8383  char            ltime[64];   
    84   char            dir[1024];   
    85   char            linked_path[1024];
     84  char            dir[MAX_PATH_STORE+1];   
     85  char            linked_path[MAX_PATH_STORE+1];
    8686  char            service[64];   
    8787  char            facility[32];   
     
    107107  char            chksum_old[50];
    108108  char            chksum_new[50];
    109   char            link_old[1024];
    110   char            link_new[1024];
     109  char            link_old[MAX_PATH_STORE+1];
     110  char            link_new[MAX_PATH_STORE+1];
    111111  char            acl_old[1024];
    112112  char            acl_new[1024];
     
    134134  { NULL, N_("msg"),         0,   4, 1024, 0, offsetof(struct dbins_, msg) },
    135135
    136   { NULL, N_("path"),        0,   5,12288, 0, offsetof(struct dbins_, path)  },
     136  { NULL, N_("path"),        0,   5,MAX_PATH_STORE+1, 0, offsetof(struct dbins_, path)  },
    137137  /* username -> userid; replace (long) 'userid' - below - by 'dummy' */
    138138  { NULL, N_("userid"),      0,   6,    9, 0, offsetof(struct dbins_, user)  },
     
    155155  { NULL, N_("interface"),   0,  24,   64, 0, offsetof(struct dbins_, interface)},
    156156  { NULL, N_("time"),        0,  25,   64, 0, offsetof(struct dbins_, ltime)  },
    157   { NULL, N_("dir"),         0,  26, 1024, 0, offsetof(struct dbins_, dir)  },
    158   { NULL, N_("linked_path"), 0,  27, 1024, 0, offsetof(struct dbins_, linked_path)},
     157  { NULL, N_("dir"),         0,  26, MAX_PATH_STORE+1, 0, offsetof(struct dbins_, dir)  },
     158  { NULL, N_("linked_path"), 0,  27, MAX_PATH_STORE+1, 0, offsetof(struct dbins_, linked_path)},
    159159  { NULL, N_("service"),     0,  29,   64, 0, offsetof(struct dbins_, service)},
    160160  { NULL, N_("facility"),    0,  30,   32, 0, offsetof(struct dbins_, facility) },
     
    178178  { NULL, N_("chksum_old"),  0,  47,   50, 0, offsetof(struct dbins_, chksum_old)},
    179179  { NULL, N_("chksum_new"),  0,  48,   50, 0, offsetof(struct dbins_, chksum_new)},
    180   { NULL, N_("link_old"),    0,  49, 1024, 0, offsetof(struct dbins_, link_old)},
    181   { NULL, N_("link_new"),    0,  50, 1024, 0, offsetof(struct dbins_, link_new)},
     180  { NULL, N_("link_old"),    0,  49, MAX_PATH_STORE+1, 0, offsetof(struct dbins_, link_old)},
     181  { NULL, N_("link_new"),    0,  50, MAX_PATH_STORE+1, 0, offsetof(struct dbins_, link_new)},
    182182                                           
    183183  { NULL, N_("size_old"),     0,  51,    0, 0, 0  },
     
    10341034static int        connection_status = S_FALSE;
    10351035
    1036 void sh_database_reset()
     1036void sh_database_reset(void)
    10371037{
    10381038  connection_status = S_FALSE;
     
    12261226}
    12271227
    1228 #define SH_QUERY_MAX 16383
     1228#define SH_QUERY_MAX SH_MSG_BUF
     1229/* define SH_QUERY_MAX 16383 */
    12291230
    12301231static
     
    14501451static int sh_database_comp_attr (const void *m1, const void *m2)
    14511452{
    1452   my_attr *mi1 = (my_attr *) m1;
    1453   my_attr *mi2 = (my_attr *) m2;
     1453  const my_attr *mi1 = (const my_attr *) m1;
     1454  const my_attr *mi2 = (const my_attr *) m2;
    14541455  return strcmp(mi1->attr, mi2->attr);
    14551456}
    14561457
    14571458
    1458 static void init_attr_table()
     1459static void init_attr_table(void)
    14591460{
    14601461  static  int first = S_TRUE;
Note: See TracChangeset for help on using the changeset viewer.