(no commit message)
[oweals/gnunet.git] / src / transport / plugin_transport_wlan.c
index 932d3b76265f9b5de36ee31f13f7e0bb8f4e5336..0957676f2db7e6cb0eb21655369accf409e91fdd 100644 (file)
@@ -721,6 +721,7 @@ session_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  *
  * @param endpoint pointer to the mac endpoint of the peer
  * @param peer peer identity to use for this session
+ * @param inbound inbound session?
  * @return returns the session or NULL
  */
 static struct Session *
@@ -745,6 +746,7 @@ lookup_session (struct MacEndpoint *endpoint,
  *
  * @param endpoint pointer to the mac endpoint of the peer
  * @param peer peer identity to use for this session
+ * @param inbound inbound session?
  * @return returns the session or NULL
  */
 static struct Session *
@@ -781,6 +783,7 @@ create_session (struct MacEndpoint *endpoint,
  *
  * @param endpoint pointer to the mac endpoint of the peer
  * @param peer peer identity to use for this session
+ * @param inbound inbound session?
  * @return returns the session
  */
 static struct Session *
@@ -1367,14 +1370,15 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
       break;
     }
     xmas.endpoint = mas->endpoint;
-    if (NULL == (xmas.session =  lookup_session (mas->endpoint, &wlanheader->sender, GNUNET_YES)))
+    if (NULL == (xmas.session = lookup_session (mas->endpoint, &wlanheader->sender, GNUNET_YES)))
     {
-       xmas.session = create_session (mas->endpoint, &wlanheader->sender, GNUNET_YES);
-       plugin->env->session_start (NULL, &wlanheader->sender,
-                       PLUGIN_NAME, NULL, 0, xmas.session, NULL, 0);
+      xmas.session = create_session (mas->endpoint, &wlanheader->sender, GNUNET_YES);
+      plugin->env->session_start (NULL, &wlanheader->sender,
+          PLUGIN_NAME, &mas->endpoint->addr,
+          sizeof (struct WlanAddress), xmas.session, NULL, 0);
       LOG (GNUNET_ERROR_TYPE_DEBUG,
-               "Notifying transport about peer `%s''s new inbound session %p \n",
-               GNUNET_i2s (&wlanheader->sender), xmas.session);
+          "Notifying transport about peer `%s''s new inbound session %p \n",
+          GNUNET_i2s (&wlanheader->sender), xmas.session);
     }
     LOG (GNUNET_ERROR_TYPE_DEBUG,
                "Processing %u bytes of WLAN DATA from peer `%s'\n",