Changeset 16440

Show
Ignore:
Timestamp:
05/23/08 09:52:17 (7 months ago)
Author:
piotras
Message:

Initialize schema only if there's no gtype registered for midgard_article

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/branch-1-9/midgard/core/midgard/src/midgard_connection.c

    r15946 r16440  
    184184        } 
    185185 
    186         MidgardSchema *schema = g_object_new(MIDGARD_TYPE_SCHEMA, NULL); 
    187         midgard_schema_init(schema); 
    188         midgard_schema_read_dir(schema, MIDGARD_LSCHEMA_DIR); 
    189  
    190         mgd->priv->schema = schema; 
     186        if(g_type_from_name("midgard_article") <= 0) { 
     187                MidgardSchema *schema = g_object_new(MIDGARD_TYPE_SCHEMA, NULL); 
     188                midgard_schema_init(schema); 
     189                midgard_schema_read_dir(schema, MIDGARD_LSCHEMA_DIR); 
     190                mgd->priv->schema = schema; 
     191        } 
     192 
    191193        midgard_connection_set_loglevel(mgd, loglevel); 
    192194