fix
authorChristian Grothoff <christian@grothoff.org>
Thu, 21 Jan 2010 20:02:43 +0000 (20:02 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 21 Jan 2010 20:02:43 +0000 (20:02 +0000)
src/core/core_api.c

index 83482a3d0bea24de80d61a104d72eb493fb6942b..e7e958bd7112bec3e0f00ea2e96afeaea95e82f8 100644 (file)
@@ -378,6 +378,7 @@ main_handler (void *cls, const struct GNUNET_MessageHeader *msg)
   struct GNUNET_CORE_Handle *h = cls;
   unsigned int hpos;
   const struct ConnectNotifyMessage *cnm;
+  const struct DisconnectNotifyMessage *dnm;
   const struct NotifyTrafficMessage *ntm;
   const struct ConfigurationInfoMessage *cim;
   const struct GNUNET_MessageHeader *em;
@@ -441,14 +442,14 @@ main_handler (void *cls, const struct GNUNET_MessageHeader *msg)
           GNUNET_break (0);
           break;
         }
-      if (msize != sizeof (struct ConnectNotifyMessage))
+      if (msize != sizeof (struct DisconnectNotifyMessage))
         {
           GNUNET_break (0);
           break;
         }
-      cnm = (const struct ConnectNotifyMessage *) msg;
+      dnm = (const struct DisconnectNotifyMessage *) msg;
       h->disconnects (h->cls,
-                     &cnm->peer);
+                     &dnm->peer);
       break;
     case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND:
       if (msize <