瀏覽代碼

core: tcp - increased the size for flags field in connection struct

Daniel-Constantin Mierla 8 年之前
父節點
當前提交
65ed9b065c
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      src/core/ip_addr.h
  2. 1 1
      src/core/tcp_conn.h

+ 2 - 2
src/core/ip_addr.h

@@ -159,8 +159,8 @@ typedef struct sr_net_info {
 #define SND_F_FORCE_SOCKET		4 /* send socket in dst is forced */
 
 struct snd_flags {
-	unsigned char f;          /* snd flags */
-	unsigned char blst_imask; /* blacklist ignore mask */
+	unsigned short f;          /* snd flags */
+	unsigned short blst_imask; /* blacklist ignore mask */
 };
 
 typedef struct snd_flags snd_flags_t;

+ 1 - 1
src/core/tcp_conn.h

@@ -200,7 +200,7 @@ struct tcp_connection{
 	struct tcp_req req; /* request data */
 	atomic_t refcnt;
 	enum sip_protos type; /* PROTO_TCP or a protocol over it, e.g. TLS */
-	unsigned short flags; /* connection related flags */
+	unsigned int flags; /* connection related flags */
 	snd_flags_t send_flags; /* special send flags */
 	enum tcp_conn_states state; /* connection state */
 	void* extra_data; /* extra data associated to the connection, 0 for tcp*/