Changeset 3454 for plugins

Show
Ignore:
Timestamp:
07/16/08 16:34:08 (1 month ago)
Author:
bellmich
Message:

use centralized session ID generation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/syncml/src/syncml_http_client.c

    r3436 r3454  
    7777    } 
    7878 
    79     /* create random session ID - glib only supports 32 bit random numbers */ 
    80     guint64 sessionID = (((guint64) g_random_int ()) << 32) + g_random_int (); 
    81     char *sessionString = g_strdup_printf("%lu", sessionID); 
    82     osync_trace(TRACE_INTERNAL, "%s: new session ID is %llu (%s)", 
    83                 __func__, sessionID, sessionString); 
    84  
    8579    /* create session */ 
     80    char *sessionString = smlManagerGetNewSessionID(env->manager); 
     81    guint64 sessionID = strtoull(sessionString, NULL, 10); 
    8682    SmlLocation *target = smlLocationNew(env->url, NULL, error); 
    8783    SmlLocation *source = smlLocationNew(env->identifier, NULL, error);