add: if (site_str && site) { site_str->len = strlen(site_text); site_str->s = strdup(site_text); } if (floor_str && floor) { floor_str->len = strlen(floor_text); floor_str->s = strdup(floor_text); } if (room_str && room) { room_str->len = strlen(room_text); room_str->s = strdup(room_text); } if (xp && x) { *xp = strtod(x_text, NULL); } if (yp && y) { *yp = strtod(y_text, NULL); } if (radiusp && radius) { *radiusp = strtod(radius_text, NULL); }
context: void parse_pidf(char *pidf_body, str *basic_str, str *location_str){	xmlDocPtr doc = NULL;	xmlNodePtr presence = NULL;	xmlAttrPtr sipuri = NULL;	xmlNodePtr basic = NULL;	xmlNodePtr location = NULL;	char *sipuri_text = NULL;	char *basic_text = NULL;	char *location_text = NULL;	doc = event_body_parse(pidf_body);	presence = xmlDocGetNodeByName(doc, "presence", NULL);	basic = xmlDocGetNodeByName(doc, "basic", NULL);	location = xmlDocGetNodeByName(doc, "loc", NULL);	LOG(L_INFO, "presence=%p basic=%p location=%p\n", presence, basic, location);	sipuri = xmlNodeGetAttrByName(presence, "entity");	if (sipuri)		sipuri_text = xmlNodeGetContent(sipuri->children);	if (basic)		basic_text = xmlNodeGetContent(basic->children);	if (location)		location_text = xmlNodeGetContent(location->children);	LOG(L_INFO, "parse_pidf: sipuri=%p:%s basic=%p:%s location=%p:%s\n",	    sipuri, sipuri_text, basic, basic_text, location, location_text);	if (basic_str && basic) {		basic_str->len = strlen(basic_text);		basic_str->s = strdup(basic_text);	}	if (location_str && location) {		location_str->len = strlen(location_text);		location_str->s = strdup(location_text);	}}