小修改。 (#112)

* event_assign 事件只执行一次,从EV_PERSIST改为0。

* 增加两个函数
  1、gettimestr 处理日期时间。
  2、trim       去除两边空格。

* Revert "增加两个函数"

This reverts commit 7cb8ab9c165305a2325dd8e163c16dbd8700d27a.

* 修改贡献者列表。
This commit is contained in:
刘启铨 2017-05-11 17:09:55 +08:00 committed by Dengfeng Liu
parent ce1c7bdcd7
commit b725e85842
2 changed files with 3 additions and 1 deletions

View File

@ -13,3 +13,5 @@ Thank you to all contributors:
[jianhuizhao](https://github.com/809205580)
[wangyin2016](https://github.com/wangyin2016)
[LiuQiQuan](https://github.com/tea4go)

View File

@ -418,7 +418,7 @@ static int https_redirect (char *gw_ip, t_https_server *https_server) {
check_internet_available(popular_server);
check_auth_server_available();
event_assign(&timeout, base, -1, EV_PERSIST, schedule_work_cb, (void*) &timeout);
event_assign(&timeout, base, -1, 0, schedule_work_cb, (void*) &timeout);
evutil_timerclear(&tv);
tv.tv_sec = config_get_config()->checkinterval;
event_add(&timeout, &tv);