ast_uri_encode(elm, field, sizeof(field), EncodeSpecialChars);
ast_str_append(&query, 0, "%s=%s%%3A%d", field,
type == RQ_CHAR ? "char" :
- type == RQ_INTEGER ? "integer" :
+ type == RQ_INTEGER1 ? "integer1" :
+ type == RQ_UINTEGER1 ? "uinteger1" :
+ type == RQ_INTEGER2 ? "integer2" :
+ type == RQ_UINTEGER2 ? "uinteger2" :
+ type == RQ_INTEGER3 ? "integer3" :
+ type == RQ_UINTEGER3 ? "uinteger3" :
+ type == RQ_INTEGER4 ? "integer4" :
+ type == RQ_UINTEGER4 ? "uinteger4" :
+ type == RQ_INTEGER8 ? "integer8" :
+ type == RQ_UINTEGER8 ? "uinteger8" :
type == RQ_DATE ? "date" :
type == RQ_DATETIME ? "datetime" :
type == RQ_FLOAT ? "float" :
.require_func = require_curl,
};
-static int unload_module (void)
+static int unload_module(void)
{
ast_config_engine_deregister(&curl_engine);
ast_verb(1, "res_config_curl unloaded.\n");
return 0;
}
-static int load_module (void)
+static int load_module(void)
{
+ if (!ast_module_check("res_curl.so")) {
+ if (ast_load_resource("res_curl.so") != AST_MODULE_LOAD_SUCCESS) {
+ ast_log(LOG_ERROR, "Cannot load res_curl, so res_config_curl cannot be loaded\n");
+ return AST_MODULE_LOAD_DECLINE;
+ }
+ }
+
ast_config_engine_register(&curl_engine);
ast_verb(1, "res_config_curl loaded.\n");
return 0;