diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-08-27 11:51:11 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-08-27 11:51:11 +0000 |
commit | 1d18c4dbc82dfa442933148a171d37546ec41332 (patch) | |
tree | 3bcf532aecc00bf68379c9d91c2ada24a91992ca /src/transport/plugin_transport_http_client.c | |
parent | 10e28c9c40cc8c4b5485af426b723f63a14aef99 (diff) | |
download | gnunet-1d18c4dbc82dfa442933148a171d37546ec41332.tar.gz gnunet-1d18c4dbc82dfa442933148a171d37546ec41332.zip |
changes
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 6f74fdf34..5fbf3592d 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -1140,6 +1140,24 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
1140 | } | 1140 | } |
1141 | 1141 | ||
1142 | 1142 | ||
1143 | static int | ||
1144 | client_configure_plugin (struct HTTP_Client_Plugin *plugin) | ||
1145 | { | ||
1146 | unsigned long long max_connections; | ||
1147 | |||
1148 | /* Optional parameters */ | ||
1149 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (plugin->env->cfg, | ||
1150 | plugin->name, | ||
1151 | "MAX_CONNECTIONS", &max_connections)) | ||
1152 | max_connections = 128; | ||
1153 | plugin->max_connections = max_connections; | ||
1154 | |||
1155 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | ||
1156 | _("Maximum number of connections is %u\n"), | ||
1157 | plugin->max_connections); | ||
1158 | return GNUNET_OK; | ||
1159 | } | ||
1160 | |||
1143 | /** | 1161 | /** |
1144 | * Entry point for the plugin. | 1162 | * Entry point for the plugin. |
1145 | */ | 1163 | */ |
@@ -1184,6 +1202,12 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) | |||
1184 | plugin->protocol = "http"; | 1202 | plugin->protocol = "http"; |
1185 | #endif | 1203 | #endif |
1186 | 1204 | ||
1205 | if (GNUNET_SYSERR == client_configure_plugin (plugin)) | ||
1206 | { | ||
1207 | LIBGNUNET_PLUGIN_TRANSPORT_DONE (api); | ||
1208 | return NULL; | ||
1209 | } | ||
1210 | |||
1187 | /* Start client */ | 1211 | /* Start client */ |
1188 | if (GNUNET_SYSERR == client_start (plugin)) | 1212 | if (GNUNET_SYSERR == client_start (plugin)) |
1189 | { | 1213 | { |