From: Maxim Mamontov Date: Mon, 8 Aug 2011 18:27:33 +0000 (+0300) Subject: Added specialization for std::string of Value2OS X-Git-Tag: 2.408-alpha~46 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/f22e1c9370866c330b79728a364c8ab1a9f43335 Added specialization for std::string of Value2OS --- diff --git a/projects/stargazer/plugins/other/smux/value2os.h b/projects/stargazer/plugins/other/smux/value2os.h index 20e62405..d17cb357 100644 --- a/projects/stargazer/plugins/other/smux/value2os.h +++ b/projects/stargazer/plugins/other/smux/value2os.h @@ -50,4 +50,15 @@ asn_long2INTEGER(&simpleSyntax->choice.number, value); return true; } +template <> +inline +bool ValueToOS(const std::string & value, ObjectSyntax * objectSyntax) +{ +objectSyntax->present = ObjectSyntax_PR_simple; +SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple; +simpleSyntax->present = SimpleSyntax_PR_string; +OCTET_STRING_fromBuf(&simpleSyntax->choice.string, value.c_str(), value.length()); +return true; +} + #endif