Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SOFIAPUBFUN su_root_t* su_root_clone ( su_root_t self,
su_root_magic_t magic 

Create a a new root object sharing port/thread with existing one.

Allocate and initialize the instance of su_root_t.

selfpointer to a root object.
magicpointer to user data
A pointer to allocated su_root_t instance, NULL on error.

Definition at line 433 of file su_root.c.

References su_clone_forget(), su_clone_start(), su_root_clone(), and su_root_set_magic().

Referenced by su_root_clone().

  int threading = 0, error;
  su_clone_r clone;
  su_root_t *cloned = NULL;

  if (self == NULL)
    return NULL;

  threading = self->sur_threading, self->sur_threading = 0;
  error = su_clone_start(self, clone,
                   (void *)&cloned, su_root_clone_initializer, NULL);
  self->sur_threading = threading;

  if (error)
    return NULL;

  su_clone_forget(clone);     /* destroyed with su_root_destroy() */
  su_root_set_magic(cloned, magic);
  return cloned;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index