if(pres_sphere_enable
&& presentity->event->evp->type == EVENT_PRESENCE) {
if(publ_cache_enabled
- && update_phtable(presentity, pres_uri, *body) < 0) {
+ && update_phtable(presentity, &pres_uri, body) < 0) {
LM_ERR("failed to update sphere for presentity\n");
goto error;
}
if(pres_sphere_enable && event == EVENT_PRESENCE) {
body.s = (char *)row_vals[body_col].val.string_val;
body.len = strlen(body.s);
- sphere = extract_sphere(body);
+ sphere = extract_sphere(&body);
}
if(insert_phtable(&uri, event, sphere) < 0) {
return -1;
}
-char *extract_sphere(str body)
+char *extract_sphere(str *body)
{
/* check for a rpid sphere element */
char *cont, *sphere = NULL;
- doc = xmlParseMemory(body.s, body.len);
+ doc = xmlParseMemory(body->s, body->len);
if(doc == NULL) {
LM_ERR("failed to parse xml body\n");
return NULL;
goto error;
}
- sphere = extract_sphere(body);
+ sphere = extract_sphere(&body);
pa_dbf.free_result(pa_db, result);
pres = new_presentity(realm, user, expires, ev, etag, sender);
if(pres_sphere_enable) {
- sphere = extract_sphere(*body);
+ sphere = extract_sphere(body);
}
if(pres) {
ret = update_presentity(