瀏覽代碼

registrar: ptr->sock may not be available, as we received the info on a different channel (e.g. reginfo) (bugfix)

Carsten Bock 10 年之前
父節點
當前提交
a4e9f2234f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/registrar/regpv.c

+ 1 - 1
modules/registrar/regpv.c

@@ -544,7 +544,7 @@ int pv_fetch_contacts(struct sip_msg* msg, char* table, char* uri,
 			c0->instance.len = ptr->instance.len;
 			p += c0->instance.len;
 		}
-		if (ptr->sock->proto == PROTO_TCP || ptr->sock->proto == PROTO_TLS || ptr->sock->proto == PROTO_WS || ptr->sock->proto == PROTO_WSS)
+		if ((ptr->sock) && (ptr->sock->proto == PROTO_TCP || ptr->sock->proto == PROTO_TLS || ptr->sock->proto == PROTO_WS || ptr->sock->proto == PROTO_WSS))
 		{
 			c0->tcpconn_id = ptr->tcpconn_id;
 		}