Changeset 50921 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
- Timestamp:
- Mar 28, 2014 3:47:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r50913 r50921 3073 3073 if (cbHdr < sizeof (*pFnCmd)) 3074 3074 { 3075 crWarning("invalid write cmd buffer size!");3075 WARN(("invalid write cmd buffer size!")); 3076 3076 rc = VERR_INVALID_PARAMETER; 3077 3077 break; … … 3081 3081 if (!pBuffer) 3082 3082 { 3083 crWarning("invalid buffer data received from guest!");3083 WARN(("invalid buffer data received from guest!")); 3084 3084 rc = VERR_INVALID_PARAMETER; 3085 3085 break; … … 3089 3089 if (RT_FAILURE(rc)) 3090 3090 { 3091 WARN(("crVBoxServerClientGet failed %d", rc)); 3091 3092 break; 3092 3093 } … … 3101 3102 rc = crVBoxServerInternalClientWriteRead(pClient); 3102 3103 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData); 3103 return rc; 3104 } 3105 else 3106 { 3107 crWarning("invalid number of args"); 3108 rc = VERR_INVALID_PARAMETER; 3104 if (RT_FAILURE(rc)) 3105 { 3106 WARN(("crVBoxServerInternalClientWriteRead failed %d", rc)); 3107 break; 3108 } 3109 3109 break; 3110 3110 } 3111 3112 WARN(("invalid number of args")); 3113 rc = VERR_INVALID_PARAMETER; 3111 3114 break; 3112 3115 } … … 3128 3131 if (cbHdr < sizeof (*pFnCmd)) 3129 3132 { 3130 crWarning("invalid inject cmd buffer size!");3133 WARN(("invalid inject cmd buffer size!")); 3131 3134 rc = VERR_INVALID_PARAMETER; 3132 3135 break; … … 3136 3139 if (!pBuffer) 3137 3140 { 3138 crWarning("invalid buffer data received from guest!");3141 WARN(("invalid buffer data received from guest!")); 3139 3142 rc = VERR_INVALID_PARAMETER; 3140 3143 break; … … 3144 3147 if (RT_FAILURE(rc)) 3145 3148 { 3149 WARN(("crVBoxServerClientGet failed %d", rc)); 3146 3150 break; 3147 3151 } … … 3156 3160 rc = crVBoxServerInternalClientWriteRead(pClient); 3157 3161 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData); 3158 return rc; 3162 if (RT_FAILURE(rc)) 3163 { 3164 WARN(("crVBoxServerInternalClientWriteRead failed %d", rc)); 3165 break; 3166 } 3167 3168 break; 3159 3169 } 3160 3170 3161 crWarning("invalid number of args");3171 WARN(("invalid number of args")); 3162 3172 rc = VERR_INVALID_PARAMETER; 3163 3173 break; … … 3179 3189 if (cbHdr < sizeof (*pFnCmd)) 3180 3190 { 3181 crWarning("invalid read cmd buffer size!");3191 WARN(("invalid read cmd buffer size!")); 3182 3192 rc = VERR_INVALID_PARAMETER; 3183 3193 break; 3184 3194 } 3185 3195 3186 3187 3196 if (!pBuffer) 3188 3197 { 3189 crWarning("invalid buffer data received from guest!");3198 WARN(("invalid buffer data received from guest!")); 3190 3199 rc = VERR_INVALID_PARAMETER; 3191 3200 break; … … 3195 3204 if (RT_FAILURE(rc)) 3196 3205 { 3206 WARN(("crVBoxServerClientGet failed %d", rc)); 3197 3207 break; 3198 3208 } … … 3208 3218 3209 3219 /* the read command is never pended, complete it right away */ 3210 pHdr->result = rc; 3211 3212 return VINF_SUCCESS; 3220 if (RT_FAILURE(rc)) 3221 { 3222 WARN(("crVBoxServerInternalClientRead failed %d", rc)); 3223 break; 3224 } 3225 3226 break; 3213 3227 } 3214 3228 … … 3238 3252 if (cbHdr < sizeof (*pFnCmd)) 3239 3253 { 3240 crWarning("invalid write_read cmd buffer size!");3254 WARN(("invalid write_read cmd buffer size!")); 3241 3255 rc = VERR_INVALID_PARAMETER; 3242 3256 break; 3243 3257 } 3244 3258 3245 3246 3259 CRASSERT(cbBuffer); 3247 3260 if (!pBuffer) 3248 3261 { 3249 crWarning("invalid write buffer data received from guest!");3262 WARN(("invalid write buffer data received from guest!")); 3250 3263 rc = VERR_INVALID_PARAMETER; 3251 3264 break; … … 3255 3268 if (!pWriteback) 3256 3269 { 3257 crWarning("invalid writeback buffer data received from guest!");3270 WARN(("invalid writeback buffer data received from guest!")); 3258 3271 rc = VERR_INVALID_PARAMETER; 3259 3272 break; 3260 3273 } 3274 3261 3275 rc = crVBoxServerClientGet(u32ClientID, &pClient); 3262 3276 if (RT_FAILURE(rc)) 3263 3277 { 3264 pHdr->result = rc;3265 return VINF_SUCCESS;3278 WARN(("crVBoxServerClientGet failed %d", rc)); 3279 break; 3266 3280 } 3267 3281 … … 3275 3289 rc = crVBoxServerInternalClientWriteRead(pClient); 3276 3290 CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData); 3277 return rc; 3291 3292 if (RT_FAILURE(rc)) 3293 { 3294 WARN(("crVBoxServerInternalClientWriteRead failed %d", rc)); 3295 break; 3296 } 3297 3298 break; 3278 3299 } 3279 3300 … … 3306 3327 } 3307 3328 3308 /* we can be on fail only here */3309 CRASSERT(RT_FAILURE(rc));3310 3329 pHdr->result = rc; 3311 3330 3312 return rc;3331 return VINF_SUCCESS; 3313 3332 } 3314 3333 … … 3500 3519 return -1; 3501 3520 } 3521 case VBOXCMDVBVA_OPTYPE_FLIP: 3522 { 3523 const VBOXCMDVBVA_FLIP *pFlip; 3524 3525 if (cbCmd < sizeof (VBOXCMDVBVA_FLIP)) 3526 { 3527 WARN(("invalid buffer size")); 3528 return -1; 3529 } 3530 3531 pFlip = (const VBOXCMDVBVA_FLIP*)pCmd; 3532 return crVBoxServerCrCmdFlipProcess(pFlip); 3533 } 3502 3534 case VBOXCMDVBVA_OPTYPE_BLT_OFFPRIMSZFMT_OR_ID: 3503 3535 {
Note:
See TracChangeset
for help on using the changeset viewer.