yy1717
2020-01-08 8ebe83a59e982317a746e8dd61d87c4a2359b40d
lib/src/main/cpp/rtk_platform/platform.cpp
@@ -22,7 +22,7 @@
#define PARSE_BUFF_SIZE         4096
const char *VK_REG = "platform_register";
#define DEBUG(fmt, args...)     LOGD("<platform> <%s>: " fmt, __func__, ##args)
struct platformSocket {
    char domain_name[32];
@@ -84,6 +84,8 @@
void InitPlatform(const uint8_t *phone, const char *domain_name, int port)
{
    DEBUG("InitPlatform");
    pthread_mutex_init(&platform_tx_mutex, NULL);
    pthread_mutex_init(&events_mutex, NULL);
@@ -105,15 +107,16 @@
    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);//detached
    pthread_create(&pid, &attr, StatusListenThread, NULL);
    MA_ReqRtkPlatformConfig();
    AppTimer_add(ReqRtkPlatformConfigTimeout, D_SEC(2));
    MA_ReqRtkPlatformConfig();
}
static void ReqRtkPlatformConfigTimeout(union sigval sig)
{
    AppTimer_delete(ReqRtkPlatformConfigTimeout);
    MA_ReqRtkPlatformConfig();
    AppTimer_add(ReqRtkPlatformConfigTimeout, D_SEC(2));
    MA_ReqRtkPlatformConfig();
}
void ConfigPlatform(const rtk_platform_cfg_t *p)