+
+ xbt_cfg_set_int(cfg, key, i); /* throws */
+ break;
+
+ case xbt_cfgelm_double:
+ d = strtod(value, &ret);
+ if (value == NULL) {
+ xbt_die("Value of option %s not valid. Should be a double", key);
+ }
+
+ xbt_cfg_set_double(cfg, key, d); /* throws */
+ break;
+
+ case xbt_cfgelm_peer:
+ val = xbt_strdup(value);
+ str = val;
+ val = strchr(val, ':');
+ if (!val) {
+ xbt_die("Value of option %s not valid. Should be an peer (machine:port)", key);
+ }
+
+ *(val++) = '\0';
+ i = strtol(val, &ret, 0);
+ if (val == NULL) {
+ xbt_die("Value of option %s not valid. Should be an peer (machine:port)", key);
+ }
+
+ xbt_cfg_set_peer(cfg, key, str, i); /* throws */
+ free(val);
+ break;
+
+ default:
+ THROWF(unknown_error, 0, "Type of config element %s is not valid.", key);
+ break;