[Sofaswitch-svn] [commit] r435 - sofaswitch/trunk/callflow/src
Author: derek Date: Sun Jul 27 01:22:16 2008 New Revision: 435 Modified: sofaswitch/trunk/callflow/src/requestnode.cpp sofaswitch/trunk/callflow/src/shapelist.cpp Log: requestnewid command is changed, to now include a unique identifying string. this means one RequestNewId node on the panel will not interfere with another. Alternatively, multiple uses of a RequestNewid node on the panel will not interfere with another. Modified: sofaswitch/trunk/callflow/src/requestnode.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/requestnode.cpp (original) +++ sofaswitch/trunk/callflow/src/requestnode.cpp Sun Jul 27 01:22:16 2008 @@ -111,7 +111,8 @@ file.AddLine(wxT(" except: ")); file.AddLine(wxT(" print \"Could not process \", rNode, \" as a Python string\" ")); file.AddLine(wxT(" return self.data[a][\"Output\"] ")); - file.AddLine(wxT(" rhost = rhost + \":REQUESTNEWID \" ")); + file.AddLine(wxT(" rnewid = \"REQUESTNEWID\" + str(random.random()) ")); + file.AddLine(wxT(" rhost = rhost + \":\" + rnewid + \" \" ")); file.AddLine(wxT(" additional = self.data[a][\"Additional info\"] ")); file.AddLine(wxT(" if len(additional) > 0: ")); file.AddLine(wxT(" try: ")); @@ -122,7 +123,7 @@ file.AddLine(wxT(" rhost += \"\\0\" ")); file.AddLine(wxT(" self.transport.write(rhost) ")); file.AddLine(wxT(" self.currentHandlers[eName] = a ")); - file.AddLine(wxT(" rEvent = eval(rNode) + \"REQUESTNEWID\" ")); + file.AddLine(wxT(" rEvent = eval(rNode) + rnewid ")); file.AddLine(wxT(" self.currentHandlers[rEvent] = a ")); file.AddLine(wxT(" return self.data[a][\"Output\"] ")); file.AddLine(wxT(" else: ")); Modified: sofaswitch/trunk/callflow/src/shapelist.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/shapelist.cpp (original) +++ sofaswitch/trunk/callflow/src/shapelist.cpp Sun Jul 27 01:22:16 2008 @@ -334,6 +334,7 @@ file.AddLine(wxT("#!/usr/bin/python ")); file.AddLine(wxT(" ")); file.AddLine(wxT("import sys ")); + file.AddLine(wxT("import random ")); file.AddLine(wxT("import os ")); file.AddLine(wxT("import time ")); file.AddLine(wxT("import socket "));
participants (1)
-
SofaSWITCH SVN