mmserv/tms/tmsimpl/src/tmsglobalroutingimpl.cpp
branchRCL_3
changeset 7 3d8c721bf319
parent 0 71ca22bcf22a
child 9 f5c5c82a163e
--- a/mmserv/tms/tmsimpl/src/tmsglobalroutingimpl.cpp	Mon Mar 15 12:42:35 2010 +0200
+++ b/mmserv/tms/tmsimpl/src/tmsglobalroutingimpl.cpp	Wed Mar 31 22:29:45 2010 +0300
@@ -15,7 +15,6 @@
  *
  */
 
-#include <tms.h>
 #include "tmsutility.h"
 #include "tmsglobalroutingbodyimpl.h"
 #include "tmsglobalroutingimpl.h"
@@ -49,7 +48,6 @@
     return ret;
     }
 
-// TO DO stop exporting this function
 EXPORT_C gint TMSGlobalRoutingImpl::Create(TMSGlobalRouting*& globrouting)
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
@@ -65,7 +63,11 @@
             self = NULL;
             }
         }
-    globrouting = self;
+    if (self && ret == TMS_RESULT_SUCCESS)
+        {
+        globrouting = self;
+        ret = self->SetParent(globrouting);
+        }
     TRACE_PRN_FN_EXT;
     return ret;
     }
@@ -80,4 +82,17 @@
     return ret;
     }
 
-// End of file
+gint TMSGlobalRoutingImpl::SetParent(TMSGlobalRouting*& parent)
+    {
+    gint ret(TMS_RESULT_SUCCESS);
+    if (this->iBody)
+        {
+        ((TMSGlobalRoutingBodyImpl*) this->iBody)->SetParent(parent);
+        }
+    else
+        {
+        ret = TMS_RESULT_UNINITIALIZED_OBJECT;
+        }
+    return ret;
+    }
+