Module: kamailio Branch: 4.2 Commit: d97a2f6936fd84459e167143fc5c3a2571712e89 URL: https://github.com/kamailio/kamailio/commit/d97a2f6936fd84459e167143fc5c3a2571712e89
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2015-01-08T17:16:12+01:00 dmq: more initialization of pointers at declaration of vars (cherry picked from commit 4d52cc0556d2e9cf334aca89325589f1c86b4dc7) --- Modified: modules/dmq/dmq.c Modified: modules/dmq/notification_peer.c --- Diff: https://github.com/kamailio/kamailio/commit/d97a2f6936fd84459e167143fc5c3a2571712e89.diff Patch: https://github.com/kamailio/kamailio/commit/d97a2f6936fd84459e167143fc5c3a2571712e89.patch --- diff --git a/modules/dmq/dmq.c b/modules/dmq/dmq.c index 9b0df41..d8e7733 100644 --- a/modules/dmq/dmq.c +++ b/modules/dmq/dmq.c @@ -75,12 +75,12 @@ sl_api_t slb; /** module variables */ str dmq_request_method = str_init("KDMQ"); -dmq_worker_t* workers; +dmq_worker_t* workers = NULL; dmq_peer_list_t* peer_list = 0; /* the list of dmq servers */ -dmq_node_list_t* node_list; +dmq_node_list_t* node_list = NULL; // the dmq module is a peer itself for receiving notifications regarding nodes -dmq_peer_t* dmq_notification_peer; +dmq_peer_t* dmq_notification_peer = NULL; /** module functions */ static int mod_init(void); diff --git a/modules/dmq/notification_peer.c b/modules/dmq/notification_peer.c index 2e87c77..ae92e82 100644 --- a/modules/dmq/notification_peer.c +++ b/modules/dmq/notification_peer.c @@ -38,6 +38,8 @@ int *dmq_init_callback_done = 0; int add_notification_peer() { dmq_peer_t not_peer; + + memset(¬_peer, 0, sizeof(dmq_peer_t)); not_peer.callback = dmq_notification_callback; not_peer.init_callback = NULL; not_peer.description.s = "notification_peer"; _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev