temp commit
FossilOrigin-Name: fdf94b96e9836245f882a47d3a68a097185882d8b11009f4ade52669d137056a
This commit is contained in:
parent
428b1a8334
commit
0a780b1d4e
@ -49,6 +49,7 @@ int main (int argc, const char * argv[])
|
|||||||
cw_log(LOG_INFO,"Starting AC-Tube, Name=%s, ID=%s",conf_acname,conf_acid);
|
cw_log(LOG_INFO,"Starting AC-Tube, Name=%s, ID=%s",conf_acname,conf_acid);
|
||||||
|
|
||||||
db_init();
|
db_init();
|
||||||
|
db_ping();
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_DTLS
|
#ifdef WITH_DTLS
|
||||||
|
13
src/ac/db.c
13
src/ac/db.c
@ -19,7 +19,7 @@ int db_init()
|
|||||||
int rc = sqlite3_open(filename,&handle);
|
int rc = sqlite3_open(filename,&handle);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
perror ("sqlite");
|
// perror ("sqlite");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -37,9 +37,18 @@ int db_init()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int db_start()
|
||||||
|
{
|
||||||
|
const char * cmd = "REPLACE INTO acs ";
|
||||||
|
}
|
||||||
|
#include "conf.h"
|
||||||
|
|
||||||
int db_ping()
|
int db_ping()
|
||||||
{
|
{
|
||||||
const char * cmd = "";
|
printf("Pingger\n");
|
||||||
|
const char * cmd = "UPDATE acs SET lastseen=datetime('now') WHERE acid='%s'";
|
||||||
|
printf(cmd,conf_acid);
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
// int rc = sqlite3_exec(
|
// int rc = sqlite3_exec(
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user