rem: int xpidf_add_address(str* _b, int _l, str* _addr, xpidf_status_t _st)
add: int xpidf_add_address(str* _b, int _l, str* _addr, str *id, xpidf_status_t _st)
context: int xpidf_add_address(str* _b, int _l, str* _addr, xpidf_status_t _st){	int len = 0;	char* p;	int len_available = 0;	char * available;	switch(_st) {	case XPIDF_ST_OPEN:		p = STATUS_OPEN; 		len = STATUS_OPEN_L;#ifdef WITH_MSN		available = MSNSUBSTATUS_ONLINE; 		len_available = MSNSUBSTATUS_ONLINE_L;#endif		break;#if 0	case XPIDF_ST_INUSE:     		p = STATUS_INUSE; 		len = STATUS_INUSE_L;		available = MSNSUBSTATUS_OFFLINE; 		len_available = MSNSUBSTATUS_OFFLINE_L;		break;#endif	default:	case XPIDF_ST_CLOSED: 		p = STATUS_CLOSED; 		len = STATUS_CLOSED_L;#ifdef WITH_MSN		available = MSNSUBSTATUS_OFFLINE; 		len_available = MSNSUBSTATUS_OFFLINE_L;#endif		break;	}	if (!_b || !_b->s || !_addr || !_addr->s) {		LOG(L_ERR, "xpidf_add_address: Invalid parameter value\n");		paerrno = PA_INTERNAL_ERROR;		return -1;	}	if (_l < (ATOM_STAG_L + 		  CRLF_L +		  ADDRESS_START_L + 		  _addr->len + 		  ADDRESS_END_L + 		  CRLF_L +		  len + #ifdef WITH_MSN		  len_available + #endif		  CRLF_L +		  ADDRESS_ETAG_L + 		  CRLF_L +		  ATOM_ETAG_L + 		  CRLF_L		 )	   ) {		paerrno = PA_SMALL_BUFFER;		LOG(L_ERR, "xpidf_add_address(): Buffer too small\n");		return -1;	}	str_append(_b, ATOM_STAG CRLF ADDRESS_START, ATOM_STAG_L + CRLF_L + ADDRESS_START_L);	str_append(_b, _addr->s, _addr->len);	str_append(_b, ADDRESS_END CRLF, ADDRESS_END_L + CRLF_L);	str_append(_b, p, len);#ifdef WITH_MSN	str_append(_b,available, len_available);#endif	str_append(_b, CRLF ADDRESS_ETAG CRLF ATOM_ETAG CRLF, 		   CRLF_L + ADDRESS_ETAG_L + CRLF_L + ATOM_ETAG_L + CRLF_L);	return 0;}