try setting env variable somewhere else

This commit is contained in:
dovholuknf
2020-11-25 17:22:45 -05:00
parent 770691332e
commit 6d7b160b72
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ void set_log_out(intptr_t h, libuv_ctx *lctx) {
}
void libuv_init(libuv_ctx *lctx) {
uv_os_setenv("ZITI_TIME_FORMAT", "utc");
//uv_os_setenv("ZITI_TIME_FORMAT", "utc");
lctx->l = uv_default_loop();
init_debug(lctx->l);
uv_async_init(lctx->l, &lctx->stopper, libuv_stopper);
+11
View File
@@ -37,6 +37,7 @@ import "C"
import (
"encoding/json"
"errors"
"fmt"
"github.com/openziti/desktop-edge-win/service/ziti-tunnel/config"
"github.com/robfig/cron/v3"
"io/ioutil"
@@ -68,6 +69,10 @@ type ServiceChange struct {
var _impl sdk
func init() {
err := os.Setenv("ZITI_TIME_FORMAT", "utc")
if err != nil {
fmt.Println("failed to set ZITI_TIME_FORMAT")
}
_impl.libuvCtx = (*C.libuv_ctx)(C.calloc(1, C.sizeof_libuv_ctx))
C.libuv_init(_impl.libuvCtx)
}
@@ -209,6 +214,12 @@ var cTunServerCfgName = C.CString("ziti-tunneler-server.v1")
//export serviceCB
func serviceCB(_ C.ziti_context, service *C.ziti_service, status C.int, tnlr_ctx unsafe.Pointer) {
isCnull := tnlr_ctx == C.NULL
isNil := tnlr_ctx == nil
if isCnull || isNil {
log.Errorf("in serviceCB with null tnlr_ctx??? ")
return
}
zid := (*ZIdentity)(tnlr_ctx)
if zid.Services == nil {