📄 ddns_main.c
字号:
/*
*main()
*/
#ifdef __uClinux_
#include <asm/arch-samsung/evS3C4530HEI/bootstd.h>
#endif
#include "DDNS.h"
#ifdef __uClinux_
_bsc1(char *, getbenv, char *, a)
_bsc1(int, setbenv, char *, a)
#endif
int main(int argc,char **argv)
{
int status = 0;
status = DDNS_InitBuff();
if(DH_OK != status)
{
printf("Ddns-temp or ddns-buf malloc failed, status = %d\n", status);
D_FREE(ddns_temp);
D_FREE(ddns_buf);
return DH_OK;
exit(0);
}
/*
获取配置信息直到成功为止
*/
DDNS_GetCFG_UntilSuccess();
/*
在DDNS 服务器上进行注册直到成功为止
*/
DDNS_ClientRegister_UntilSuccess();
/*
在DDNS 服务器上进行保活,10分钟一次。
*/
while(1)
{
sleep(KEEPTIMES);
DDNS_TimeKeephandle();
}
D_FREE(ddns_temp);
D_FREE(ddns_buf);
return DH_OK;
exit(0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -