+SILC_CONFIG_CALLBACK(fetch_connparam)
+{
+ SILC_SERVER_CONFIG_SECTION_INIT(SilcServerConfigSectionConnectionParam);
+
+ SERVER_CONFIG_DEBUG(("Received CONNPARAM type=%d name=\"%s\" (val=%x)",
+ type, name, context));
+
+ if (type == SILC_CONFIG_ARG_BLOCK) {
+ if (!tmp)
+ return SILC_CONFIG_OK;
+
+ SILC_SERVER_CONFIG_LIST_APPENDTMP(config->conn_params);
+ config->tmp = NULL;
+ return SILC_CONFIG_OK;
+ }
+
+ /* if there isn't a temporary struct alloc one */
+ if (!tmp) {
+ config->tmp = silc_calloc(1, sizeof(*findtmp));
+ tmp = (SilcServerConfigSectionConnectionParam *) config->tmp;
+ }
+
+ if (!strcmp(name, "name")) {
+ CONFIG_IS_DOUBLE(tmp->name);
+ tmp->name = (*(char *)val ? strdup((char *) val) : NULL);
+ }
+ else if (!strcmp(name, "keepalive_secs")) {
+ tmp->keepalive_secs = *(uint32 *)val;
+ }
+ else if (!strcmp(name, "reconnect_count")) {
+ tmp->reconnect_count = *(uint32 *)val;
+ }
+ else if (!strcmp(name, "reconnect_interval")) {
+ tmp->reconnect_interval = *(uint32 *)val;
+ }
+ else if (!strcmp(name, "reconnect_interval_max")) {
+ tmp->reconnect_interval_max = *(uint32 *)val;
+ }
+ else if (!strcmp(name, "reconnect_keep_trying")) {
+ tmp->reconnect_keep_trying = *(bool *)val;
+ }
+ else
+ return SILC_CONFIG_EINTERNAL;
+
+ return SILC_CONFIG_OK;
+
+ got_err:
+ silc_free(tmp->name);
+ silc_free(tmp);
+ config->tmp = NULL;
+ return got_errno;
+}
+