DB ping thread introduced.
FossilOrigin-Name: 4a8e776060bfbfc8d2cbb51067ea1adb2b0d9939183d447f1b227060334dae17
This commit is contained in:
parent
6cdd681ef0
commit
04023ecc9a
@ -34,10 +34,19 @@
|
|||||||
|
|
||||||
#include "socklist.h"
|
#include "socklist.h"
|
||||||
|
|
||||||
|
#include "db.h"
|
||||||
|
|
||||||
int ac_run();
|
int ac_run();
|
||||||
|
|
||||||
|
void alive_thread(void *data)
|
||||||
|
{
|
||||||
|
while(1){
|
||||||
|
sleep(5);
|
||||||
|
db_ping();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int main (int argc, const char * argv[])
|
int main (int argc, const char * argv[])
|
||||||
{
|
{
|
||||||
// send_image_file(0,"/home/tube/Downloads/c1130-rcvk9w8-tar.124-25e.JAP.tar");
|
// send_image_file(0,"/home/tube/Downloads/c1130-rcvk9w8-tar.124-25e.JAP.tar");
|
||||||
@ -66,6 +75,9 @@ int main (int argc, const char * argv[])
|
|||||||
db_start();
|
db_start();
|
||||||
db_ping();
|
db_ping();
|
||||||
|
|
||||||
|
pthread_t alth;
|
||||||
|
pthread_create (&alth, NULL, alive_thread, (void *)0);
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_DTLS
|
#ifdef WITH_DTLS
|
||||||
dtls_init();
|
dtls_init();
|
||||||
|
Loading…
Reference in New Issue
Block a user