VirtualBox

儲存庫 vbox 的更動 18419


忽略:
時間撮記:
2009-3-27 下午05:41:47 (16 年 以前)
作者:
vboxsync
訊息:

slirp.c: Overlooked another bogus LogRel(("adding %s to DNS suffix list\n")). Suggest simpler char conversion (disabled).

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r18239 r18419  
    369369    while(addr != NULL)
    370370    {
     371#if 1
    371372        size_t buff_size;
     373#endif
    372374        if (addr->OperStatus != IfOperStatusUp)
    373375            goto next;
     
    405407        suffix[buff_size] = '\0';
    406408        LogRel(("NAT: adding %s to DNS suffix list\n", suffix));
    407 #else
    408         /*Probably more correct way but not working */
    409         buff_size = WideCharToMultiByte(CP_ACP, 0, addr->DnsSuffix, -1, NULL, 0, NULL, NULL);
    410         suffix = RTMemAllocZ(buff_size);
    411         WideCharToMultiByte(CP_ACP, 0, addr->DnsSuffix, -1, suffix, buff_size, NULL, NULL);
    412 #endif
    413         *ppszDomain = suffix;
     409        *ppszDomain = suffix; /* may leak memory */
     410#else /** @todo r=bird: try this (no time to test for BETA2). Btw. what happend to suffix 'adding', the code above doesn't do what the LogRel() says... */
     411        /* add the first one only. */
     412        if (ppszDomain && !*ppszDomain)
     413            RTUtf16ToUtf8(addr->DnsSuffix, ppszDomain);
     414#endif
    414415    next:
    415416        addr = addr->Next;
    416417    }
    417     /*@todo add dns suffix if required */
    418     LogRel(("NAT: adding dns suffix %s to the list \n", ppszDomain));
     418    /** @todo add dns suffix if required */
     419    if (ppszDomain && *ppszDomain)
     420        LogRel(("NAT: DNS suffix %s\n", *ppszDomain));
    419421    return 0;
    420422}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette