Add extra ASSERT to check PoweredTransactionCount is 0 on power-on
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
		
							parent
							
								
									e7d5cdc4f0
								
							
						
					
					
						commit
						b6056b95d3
					
				
							
								
								
									
										2
									
								
								wintun.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								wintun.c
									
									
									
									
									
								
							@ -1313,6 +1313,8 @@ static NDIS_STATUS TunOidSet(_Inout_ TUN_CTX *ctx, _Inout_ NDIS_OID_REQUEST *Oid
 | 
			
		||||
			if (InterlockedCompareExchange((LONG *)&ctx->Power, TUN_POWER_RESUMING, TUN_POWER_SUSPENDED) != TUN_POWER_SUSPENDED)
 | 
			
		||||
				return NDIS_STATUS_FAILURE;
 | 
			
		||||
 | 
			
		||||
			ASSERT(!InterlockedGet64(&ctx->PoweredTransactionCount));
 | 
			
		||||
 | 
			
		||||
			InterlockedExchange((LONG *)&ctx->Power, TUN_POWER_RUNNING);
 | 
			
		||||
		}
 | 
			
		||||
		return NDIS_STATUS_SUCCESS;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user