MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / shm_strdup

Function shm_strdup

ut.h:895–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893}
894
895static inline char *shm_strdup(const char *str)
896{
897 char *rval;
898 int len;
899
900 if (!str)
901 return NULL;
902
903 len = strlen(str) + 1;
904 rval = shm_malloc(len);
905 if (!rval)
906 return NULL;
907 memcpy(rval, str, len);
908 return rval;
909}
910
911/*
912 * Ensure the given (str *) points to an SHM buffer of at least "size" bytes

Callers 12

tr_parse_tzFunction · 0.85
tls_shared_info_storeFunction · 0.85
NAT_Contact_newFunction · 0.85
__dialog_confirmedFunction · 0.85
__tm_request_inFunction · 0.85
fs_run_esl_commandFunction · 0.85
ctrFunction · 0.85
cmtrFunction · 0.85
h2_send_responseFunction · 0.85

Calls 1

shm_mallocFunction · 0.85

Tested by 2

ctrFunction · 0.68
cmtrFunction · 0.68