Module: kamailio Branch: master Commit: 36d26bdd9bb92c0be5d5134855536981cb1d9264 URL: https://github.com/kamailio/kamailio/commit/36d26bdd9bb92c0be5d5134855536981cb1d9264
Author: Carsten Bock <[email protected]> Committer: Carsten Bock <[email protected]> Date: 2015-06-02T20:20:26+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/36d26bdd9bb92c0be5d5134855536981cb1d9264.diff Patch: https://github.com/kamailio/kamailio/commit/36d26bdd9bb92c0be5d5134855536981cb1d9264.patch --- 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; } _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
