- fix error messages
[oweals/gnunet.git] / src / transport / plugin_transport_http_client.c
index d54cd6e9e22fc883fe8d76ae970d00fc380b57fc..ba7fd45a3850d13a9950758eae038aca034ebf47 100644 (file)
@@ -477,8 +477,7 @@ http_client_plugin_send (void *cls,
   /* lookup if session is really existing */
   if (GNUNET_YES != client_exist_session (plugin, s))
   {
-    GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, plugin->name,
-                     "Trying to send with invalid session %p \n", s);
+    GNUNET_break (0);
     return GNUNET_SYSERR;
   }
 
@@ -1284,7 +1283,7 @@ client_connect_get (struct Session *s)
   curl_easy_setopt (s->client_get, CURLOPT_TIMEOUT, 0);
   curl_easy_setopt (s->client_get, CURLOPT_PRIVATE, s);
   curl_easy_setopt (s->client_get, CURLOPT_CONNECTTIMEOUT_MS,
-                    (long) HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL);
+                    (long) (HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL));
   curl_easy_setopt (s->client_get, CURLOPT_BUFFERSIZE,
                     2 * GNUNET_SERVER_MAX_MESSAGE_SIZE);
 #if CURL_TCP_NODELAY
@@ -1364,7 +1363,7 @@ client_connect_put (struct Session *s)
   curl_easy_setopt (s->client_put, CURLOPT_TIMEOUT, 0);
   curl_easy_setopt (s->client_put, CURLOPT_PRIVATE, s);
   curl_easy_setopt (s->client_put, CURLOPT_CONNECTTIMEOUT_MS,
-                    (long) HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL);
+                    (long) (HTTP_CLIENT_NOT_VALIDATED_TIMEOUT.rel_value_us / 1000LL));
   curl_easy_setopt (s->client_put, CURLOPT_BUFFERSIZE,
                     2 * GNUNET_SERVER_MAX_MESSAGE_SIZE);
 #if CURL_TCP_NODELAY
@@ -1758,6 +1757,7 @@ http_plugin_address_to_string (void *cls,
   return http_common_plugin_address_to_string (cls, PLUGIN_NAME, addr, addrlen);
 }
 
+
 static void
 http_client_plugin_update_session_timeout (void *cls,
                                   const struct GNUNET_PeerIdentity *peer,
@@ -1767,8 +1767,10 @@ http_client_plugin_update_session_timeout (void *cls,
 
   /* lookup if session is really existing */
   if (GNUNET_YES != client_exist_session (plugin, session))
+  {
+    GNUNET_break (0);
     return;
-
+  }
   client_reschedule_session_timeout (session);
 }