Module: kamailio
Branch: 4.3
Commit: a4e9f2234f29928520cca83843d5d6aa387518ad
URL:
https://github.com/kamailio/kamailio/commit/a4e9f2234f29928520cca83843d5d6a…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-06-02T20:22:46+02:00
registrar: ptr->sock may not be available, as we received the info on a different
channel (e.g. reginfo) (bugfix)
---
Modified: modules/registrar/regpv.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a4e9f2234f29928520cca83843d5d6a…
Patch:
https://github.com/kamailio/kamailio/commit/a4e9f2234f29928520cca83843d5d6a…
---
diff --git a/modules/registrar/regpv.c b/modules/registrar/regpv.c
index 8574e92..daf304e 100644
--- a/modules/registrar/regpv.c
+++ b/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;
}