Fix bug to use another constructor in stub 11/168111/3
authorJunghoon Park <jh9216.park@samsung.com>
Wed, 24 Jan 2018 07:15:30 +0000 (16:15 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Wed, 24 Jan 2018 07:19:30 +0000 (16:19 +0900)
- Stub should use the constructor which has a parameter port in case of
  'delegate' type

Change-Id: I9f5ad93f886534126a5011f560bb924395f9e675
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
idlc/cs_gen/cs_gen_base.cc

index 3564f5e..339cc26 100644 (file)
@@ -268,9 +268,12 @@ std::string CsGeneratorBase::ConvertTypeToDeserializer(
     if (make_new_type)
       ret = n + " ";
 
-    ret += id + " = new " + n +"();\n";
-    if (IsDelegateType(type.ToString()))
+    if (IsDelegateType(type.ToString())) {
+      ret += id + " = new " + n +"(port);\n";
       ret += "CallbackBase.";
+    } else {
+      ret += id + " = new " + n +"();\n";
+    }
     ret += "Deserialize(" + parcel + ", " + id +");\n";
     return ret;
   }