Commit b7d652c4 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Merge branch 'update-sp' into devel

parents a2c38bb9 de081e12
Pipeline #3118 passed with stages
in 4 minutes and 48 seconds
......@@ -973,17 +973,23 @@ igloo_error_t igloo_ro_bootstrap(igloo_ro_t *instance, const igloo_ro_type_t *ty
igloo_ro_t igloo_ro_get_instance_unsafe(igloo_ro_t self, const igloo_ro_type_t *type)
{
igloo_ro_t ret;
igloo_ro_stub_t *stub;
if (!is_valid_object(self))
return igloo_RO_NULL;
ret = igloo_RO_TO_TYPE_raw(self, type);
if (!igloo_ro_is_null(ret))
return ret;
stub = igloo_RO__GETSTUB(self);
if (is_object_of_type(self, type)) {
if (stub->refc) {
return self;
} else {
return igloo_RO_NULL;
}
}
if (!igloo_RO__GETSTUB(self)->group)
if (!stub->group)
return igloo_RO_NULL;
return igloo_RO_TO_TYPE_raw(igloo_RO__GETSTUB(self)->group->instance, type);
return igloo_RO_TO_TYPE_raw(stub->group->instance, type);
}
......@@ -48,9 +48,11 @@ static const char *constant_strings[] = {
"4294967295", "4294967296",
"18446744073709551615", "18446744073709551616",
"0x0", "0x00", "0xff", "0xFF",
"00", "000",
// Truth values:
"yes", "true", "ja", "wahr",
"no", "false", "nein", "unwahr", "falsch",
"enable", "enabled", "disable", "disabled",
// Hash names:
"SHA3-224", "SHA3-256", "SHA3-384", "SHA3-512",
// Protocols:
......@@ -64,12 +66,48 @@ static const char *constant_strings[] = {
"audio/x-matroska", "video/x-matroska", "video/x-matroska-3d",
"video/webm", "video/webm",
"image/png", "image/jpeg",
// Charsets:
"charset", "utf-8", "UTF-8",
// TLS:
"auto", "auto_no_plain", "rfc2817", "rfc2818",
// Storage:
"key", "value", "name", "type",
"description",
// Access:
"allow", "deny", "username", "password", "role",
"acl", "rule", "access",
"limit", "limits",
// Signals:
"bitrate", "samplerate", "quality",
// Vorbis Comments:
"TITLE", "VERSION", "ALBUM", "TRACKNUMBER", "ARTIST", "PERFORMER",
"COPYRIGHT", "LICENSE", "ORGANIZATION", "DESCRIPTION", "GENRE",
"DATE", "LOCATION", "CONTACT", "ISRC",
// VCLT:
"STREAMURL", "FILENAME", "FILEURL", "LENGTH", "HASH", "OFFSET",
"SIGNALINFO", "AUDIOINFO",
"codec", "rate", "bits", "channels", "x", "y", "z", "stereomode",
// UUIDs (RFC 4122):
"00000000-0000-0000-0000-000000000000", // Nil UUID
"6ba7b810-9dad-11d1-80b4-00c04fd430c8", // NameSpace_DNS
"6ba7b811-9dad-11d1-80b4-00c04fd430c8", // NameSpace_URL
"6ba7b812-9dad-11d1-80b4-00c04fd430c8", // NameSpace_OID
"6ba7b814-9dad-11d1-80b4-00c04fd430c8", // NameSpace_X500
// Others:
"Icecast", "icecast", "hackme", "test", "admin", "Earth",
"localhost", "127.0.0.1",
"source", "relay", "stream",
"Icecast", "icecast", "hackme", "test", "admin", "Earth", "igloo",
"localhost", "127.0.0.1", "::1", "::",
"source", "relay", "stream", "mount", "mountpoint",
"access.log", "error.log",
"panic", "error", "warning", "info", "debug",
"panic", "error", "warning", "info", "information", "debug",
"none", "any", "all", "own",
"default", "normal", "virtual",
"strict", "legacy", "obsolete", "compat",
"master", "slave", "client", "server", "peer",
"event", "action", "trigger", "mode",
"uri", "url", "urn",
"filename", "hostname", "location",
"port",
"implementation", "version", "config", "configuration",
"/"
};
......@@ -326,6 +364,9 @@ igloo_error_t igloo_sp_replace(const char *str, const char **ref, igloo_ro_t ins
igloo_error_t error;
const char *ret;
if (!ref)
return igloo_ERROR_FAULT;
if (str == NULL) {
ret = NULL;
} else {
......@@ -334,10 +375,12 @@ igloo_error_t igloo_sp_replace(const char *str, const char **ref, igloo_ro_t ins
return error;
}
error = igloo_sp_unref(ref, instance);
if (error != igloo_ERROR_NONE) {
__ignore_error(igloo_sp_unref(&ret, instance));
return error;
if (*ref) {
error = igloo_sp_unref(ref, instance);
if (error != igloo_ERROR_NONE) {
__ignore_error(igloo_sp_unref(&ret, instance));
return error;
}
}
*ref = ret;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment