@@ -4848,7 +4848,7 @@ void writeSharedObject(const char *srcpath, const MemoryBuffer &obj, const char
48484848 throw MakeStringException (ECLWATCH_CANNOT_COPY_DLL, " Failed copying shared object %s" , srcpath);
48494849}
48504850
4851- void deploySharedObject (IEspContext &context, StringBuffer &wuid, const char *cluster, const char *name, const MemoryBuffer &obj, const char *dir, const char *xml, bool protect)
4851+ void deploySharedObject (IEspContext &context, StringBuffer &wuid, const char *cluster, const char *name, const MemoryBuffer &obj, const char *dir, const char *xml, bool protect, const char *sourceProcess, const char *sourceFilename )
48524852{
48534853 StringBuffer dllpath, dllname;
48544854
@@ -4878,9 +4878,18 @@ void deploySharedObject(IEspContext &context, StringBuffer &wuid, const char *cl
48784878 }
48794879 }
48804880
4881+ StringBuffer originalDllName (sourceFilename);
4882+ if (originalDllName.isEmpty () && !isEmptyString (name))
4883+ originalDllName.append (name).append (SharedObjectExtension);
4884+
48814885 NewWsWorkunit wu (context, wuid);
48824886 wuid.set (wu->queryWuid ()); // Update the wuid to the new unique value
48834887
4888+ if (!originalDllName.isEmpty ())
4889+ wu->setApplicationValue (" deploy" , " sourceQuery" , originalDllName.str (), true );
4890+ if (!isEmptyString (sourceProcess))
4891+ wu->setApplicationValue (" deploy" , " sourceEnvironment" , sourceProcess, true );
4892+
48844893 // Write the dll to a filename based on the unique wuid
48854894 StringBuffer baseDllName;
48864895 baseDllName.append (SharedObjectPrefix).append (wuid).append (SharedObjectExtension);
@@ -4933,7 +4942,7 @@ void CWsWorkunitsEx::deploySharedObjectReq(IEspContext &context, IEspWUDeployWor
49334942 }
49344943
49354944 StringBuffer wuid;
4936- deploySharedObject (context, wuid, cluster, req.getName (), *uncompressed, dir, xml, req.getProtect ());
4945+ deploySharedObject (context, wuid, cluster, req.getName (), *uncompressed, dir, xml, req.getProtect (), nullptr , req. getFileName () );
49374946
49384947 WsWuInfo winfo (context, wuid.str ());
49394948 winfo.getCommon (resp.updateWorkunit (), WUINFO_All);
0 commit comments