- "Server: Found existing semi-session for `%s'\n", GNUNET_i2s (&target));
-#endif
-
- if ((direction == _SEND) && (t->server_send != NULL))
- {
-#if VERBOSE_SERVER
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Server: Duplicate GET session, dismissing new connection from peer `%s'\n", GNUNET_i2s (&target));
-#endif
- goto error;
- }
- else
- {
- s = t;
- GNUNET_CONTAINER_DLL_remove(plugin->server_semi_head, plugin->server_semi_tail, s);
- GNUNET_CONTAINER_DLL_insert(plugin->head, plugin->tail, s);
-#if VERBOSE_SERVER
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Server: Found matching semi-session, merging session for peer `%s'\n", GNUNET_i2s (&target));
-#endif
-
- goto found;
- }
- if ((direction == _RECEIVE) && (t->server_recv != NULL))
- {
-#if VERBOSE_SERVER
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Server: Duplicate PUT session, dismissing new connection from peer `%s'\n", GNUNET_i2s (&target));
-#endif
- goto error;
- }
- else
- {
- s = t;
- GNUNET_CONTAINER_DLL_remove(plugin->server_semi_head, plugin->server_semi_tail, s);
- GNUNET_CONTAINER_DLL_insert(plugin->head, plugin->tail, s);
-#if VERBOSE_SERVER
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
- "Server: Found matching semi-session, merging session for peer `%s'\n", GNUNET_i2s (&target));
-#endif
- goto found;
- }
+ "Server: Duplicate GET session, dismissing new connection from peer `%s'\n",
+ GNUNET_i2s (&target));
+ goto error;
+ }
+ else
+ {
+ s = t;
+ GNUNET_CONTAINER_DLL_remove (plugin->server_semi_head,
+ plugin->server_semi_tail, s);
+ GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s);
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+ "Server: Found matching semi-session, merging session for peer `%s'\n",
+ GNUNET_i2s (&target));
+
+ plugin->inbound_sessions ++;
+ GNUNET_STATISTICS_set (plugin->env->stats,
+ "# HTTP inbound sessions",
+ plugin->inbound_sessions,
+ GNUNET_NO);
+ GNUNET_assert (NULL != s);
+ goto found;
+ }
+ if ((direction == _RECEIVE) && (t->server_recv != NULL))
+ {
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+ "Server: Duplicate PUT session, dismissing new connection from peer `%s'\n",
+ GNUNET_i2s (&target));
+ goto error;
+ }
+ else
+ {
+ s = t;
+ GNUNET_CONTAINER_DLL_remove (plugin->server_semi_head,
+ plugin->server_semi_tail, s);
+ GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s);
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
+ "Server: Found matching semi-session, merging session for peer `%s'\n",
+ GNUNET_i2s (&target));
+ plugin->inbound_sessions ++;
+ GNUNET_STATISTICS_set (plugin->env->stats,
+ "# HTTP inbound sessions",
+ plugin->inbound_sessions,
+ GNUNET_NO);
+ GNUNET_assert (NULL != s);
+ goto found;
+ }