From f22e1c9370866c330b79728a364c8ab1a9f43335 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 8 Aug 2011 21:27:33 +0300 Subject: [PATCH] Added specialization for std::string of Value2OS --- projects/stargazer/plugins/other/smux/value2os.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.44.2