~ubuntu-branches/ubuntu/hardy/steam/hardy

« back to all changes in this revision

Viewing changes to server/factories/LinkFactory.pike

  • Committer: Bazaar Package Importer
  • Author(s): Alain Schroeder
  • Date: 2006-11-21 16:03:12 UTC
  • mfrom: (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061121160312-nf96y6nihzsyd2uv
Tags: 2.2.31-3
Add patch to prevent inconsistent data after shutdown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *  along with this program; if not, write to the Free Software
15
15
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 * 
17
 
 * $Id: LinkFactory.pike,v 1.1.1.1 2005/02/23 14:47:21 cvs Exp $
 
17
 * $Id: LinkFactory.pike,v 1.1.1.1 2006/03/27 12:40:08 exodusd Exp $
18
18
 */
19
19
 
20
 
constant cvs_version="$Id: LinkFactory.pike,v 1.1.1.1 2005/02/23 14:47:21 cvs Exp $";
 
20
constant cvs_version="$Id: LinkFactory.pike,v 1.1.1.1 2006/03/27 12:40:08 exodusd Exp $";
21
21
 
22
22
inherit "/factories/ObjectFactory";
23
23
 
35
35
    link_to = vars["link_to"];
36
36
 
37
37
    try_event(EVENT_EXECUTE, CALLER, obj, link_to);
 
38
    if ( vars->transient ) {
 
39
      if ( mappingp(vars->attributes) )
 
40
        vars->attributes[OBJ_TEMP] = 1;
 
41
      else
 
42
        vars->attributes = ([ OBJ_TEMP : 1 ]);
 
43
    }
38
44
    obj = ::object_create(vars["name"], CLASS_NAME_LINK, 0,vars["attributes"],
39
45
                vars["attributesAcquired"], vars["attributesLocked"]); 
40
46
    obj->set_link_object(link_to);