|
@@ -1268,12 +1268,13 @@ int dlg_set_toroute(struct dlg_cell *dlg, str * route) {
|
|
|
*/
|
|
|
void create_concurrent_did(struct dlg_cell *dlg, str * new_did) {
|
|
|
int len = dlg->did.len + 1;
|
|
|
- new_did = shm_malloc(len);
|
|
|
- if (new_did == 0) {
|
|
|
+ new_did->s = shm_malloc(len);
|
|
|
+ if (new_did->s == 0) {
|
|
|
LM_ERR("no more shm mem (%d)\n", len);
|
|
|
+ return;
|
|
|
}
|
|
|
memcpy(new_did->s, dlg->did.s, dlg->did.len);
|
|
|
- new_did->s[dlg->did.len+1]= 'x';
|
|
|
+ new_did->s[len]= 'x';
|
|
|
new_did->len = len;
|
|
|
}
|
|
|
|