lib/uplinkc: add user agent

Change-Id: I6627851112823a72e4001b45d9a1b80ba76b8346
This commit is contained in:
Egon Elbre 2019-12-18 14:46:27 +02:00
parent 9f1de67f6f
commit 858f349a1a
2 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ func new_uplink(cfg C.UplinkConfig, tempDir *C.char, cerr **C.char) C.UplinkRef
libcfg.Volatile.MaxInlineSize = memory.Size(cfg.Volatile.max_inline_size)
libcfg.Volatile.MaxMemory = memory.Size(cfg.Volatile.max_memory)
libcfg.Volatile.DialTimeout = time.Duration(cfg.Volatile.dial_timeout)
libcfg.Volatile.UserAgent = C.GoString(cfg.Volatile.user_agent)
lib, err := uplink.NewUplink(scope.ctx, libcfg)
if err != nil {

View File

@ -43,6 +43,7 @@ typedef struct UplinkConfig {
int32_t max_inline_size;
int32_t max_memory;
int32_t dial_timeout;
char *user_agent;
} Volatile;
} UplinkConfig;