瀏覽代碼

BSocket: assert that BSocket_GlobalInit has been called

ambrop7 15 年之前
父節點
當前提交
8edc4af402
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      system/BSocket.c

+ 2 - 1
system/BSocket.c

@@ -639,9 +639,10 @@ fail0:
     return -1;
 }
 
+// NOTE: if you change something here, you might also have to change BSocket_Accept
 int BSocket_Init (BSocket *bs, BReactor *bsys, int domain, int type)
 {
-    // NOTE: if you change something here, you might also have to change BSocket_Accept
+    ASSERT(bsocket_initialized)
     
     // translate domain
     int sys_domain;