示例#1
0
void
clone_push_list (struct options *o)
{
  if (o->push_list.head)
    {
      const struct push_entry *e = o->push_list.head;
      push_reset (o);
      while (e)
	{
	  push_option_ex (o, string_alloc (e->option, &o->gc), true, M_FATAL);
	  e = e->next;
	}
    }
}
示例#2
0
文件: push.c 项目: anlaneg/openvpn
static bool
push_option_fmt(struct gc_arena *gc, struct push_list *push_list,
                int msglevel, const char *format, ...)
{
    va_list arglist;
    char tmp[256] = {0};
    int len;
    va_start(arglist, format);
    len = vsnprintf(tmp, sizeof(tmp), format, arglist);
    va_end(arglist);
    if (len > sizeof(tmp)-1)
    {
        return false;
    }
    push_option_ex(gc, push_list, string_alloc(tmp, gc), true, msglevel);
    return true;
}
示例#3
0
文件: push.c 项目: anlaneg/openvpn
void
push_option(struct options *o, const char *opt, int msglevel)
{
    push_option_ex(&o->gc, &o->push_list, opt, true, msglevel);
}
示例#4
0
void
push_option (struct options *o, const char *opt, int msglevel)
{
  push_option_ex (o, opt, true, msglevel);
}