60 return -2; |
60 return -2; |
61 } |
61 } |
62 |
62 |
63 int tool_get_tmpdir(char *configfile) { |
63 int tool_get_tmpdir(char *configfile) { |
64 ServerConfig *serverconf = serverconfig_load(configfile); |
64 ServerConfig *serverconf = serverconfig_load(configfile); |
65 UcxList *list = serverconfig_get_node_list(serverconf->root, CONFIG_NODE_OBJECT, SC("Runtime")); |
65 CxList *list = serverconfig_get_node_list(serverconf->root, CONFIG_NODE_OBJECT, cx_str("Runtime")); |
66 if(!list) { |
66 if(!list) { |
67 fprintf(stderr, "Error: No Runtime element in %s\n", configfile); |
67 fprintf(stderr, "Error: No Runtime element in %s\n", configfile); |
68 return -1; |
68 return -1; |
69 } |
69 } |
70 if(ucx_list_size(list) != 1) { |
70 if(list->size != 1) { |
71 fprintf(stderr, "Error: Multiple Runtime elements in %s\n", configfile); |
71 fprintf(stderr, "Error: Multiple Runtime elements in %s\n", configfile); |
72 return -1; |
72 return -1; |
73 } |
73 } |
74 ConfigNode *runtime = list->data; |
74 ConfigNode *runtime = cxListAt(list, 0); |
75 scstr_t tmp = serverconfig_directive_value(runtime, SC("Temp")); |
75 cxstring tmp = serverconfig_directive_value(runtime, cx_str("Temp")); |
76 |
76 |
77 ucx_list_free(list); |
77 cxListDestroy(list); |
78 |
78 |
79 if(!tmp.ptr) { |
79 if(!tmp.ptr) { |
80 fprintf(stderr, "Error: No Temp directive in Runtime Object\n"); |
80 fprintf(stderr, "Error: No Temp directive in Runtime Object\n"); |
81 return -1; |
81 return -1; |
82 } |
82 } |