This is the problem:
```
/* now we have all the necessary values */ /* fill in the filds of the structure */
presentity= new_presentity(&pres_domain, &pres_user, lexpire, event, &etag, sender); if(presentity== NULL) { LM_ERR("creating presentity structure\n"); goto error; }
/* querry the database and update or insert */ if(update_presentity(msg, presentity, &body, etag_gen, &sent_reply, sphere) <0) { LM_ERR("when updating presentity\n"); goto error; }
```
Is located in the file publish.c