VirtualBox

vbox的更動 60910 路徑 trunk/src/VBox/Runtime


忽略:
時間撮記:
2016-5-9 下午09:00:28 (9 年 以前)
作者:
vboxsync
訊息:

iprt/socket.cpp: set *pcbWritten to 0 on windows too when returning VINF_TRY_AGAIN. Don't bother check whether VINF_SUCCESS is VERR_TRY_AGAIN! Makes the code harder to read and potentially slower.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Runtime/r3/socket.cpp

    r60902 r60910  
    12671267    }
    12681268    else
     1269    {
    12691270        rc = rtSocketError();
    1270 
    1271     if (rc == VERR_TRY_AGAIN)
    1272     {
    1273         *pcbRead = 0;
    1274         rc = VINF_TRY_AGAIN;
    1275     }
     1271        if (rc == VERR_TRY_AGAIN)
     1272        {
     1273            *pcbRead = 0;
     1274            rc = VINF_TRY_AGAIN;
     1275        }
     1276    }
     1277
    12761278#else
    12771279    ssize_t cbRead = recv(pThis->hNative, pvBuffer, cbNow, MSG_NOSIGNAL);
     
    13281330    }
    13291331    else
     1332    {
    13301333        rc = rtSocketError();
    1331 
    1332     if (rc == VERR_TRY_AGAIN)
    1333         rc = VINF_TRY_AGAIN;
     1334        if (rc == VERR_TRY_AGAIN)
     1335        {
     1336            *pcbWritten = 0;
     1337            rc = VINF_TRY_AGAIN;
     1338        }
     1339    }
    13341340#else
    13351341    ssize_t cbWritten = send(pThis->hNative, pvBuffer, cbBuffer, MSG_NOSIGNAL);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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