WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
if (NULL == mh->mq)
return;
/* notify callback about reconnect */
- mh->peer_cb (mh->peer_cb_cls,
- NULL,
- GNUNET_CORE_KX_CORE_DISCONNECT,
- GNUNET_TIME_UNIT_FOREVER_ABS);
+ if (NULL != mh->peer_cb)
+ mh->peer_cb (mh->peer_cb_cls,
+ NULL,
+ GNUNET_CORE_KX_CORE_DISCONNECT,
+ GNUNET_TIME_UNIT_FOREVER_ABS);
env = GNUNET_MQ_msg (msg,
GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS);
GNUNET_MQ_send (mh->mq,
GNUNET_assert (NULL != peer_cb);
mh = GNUNET_new (struct GNUNET_CORE_MonitorHandle);
mh->cfg = cfg;
+ reconnect (mh);
mh->peer_cb = peer_cb;
mh->peer_cb_cls = peer_cb_cls;
- reconnect (mh);
if (NULL == mh->mq)
{
GNUNET_free (mh);