Browse code

b/f: fix wrong generated contact (also part of 23c638ee b/f: errors with wrong Contact-HF)

also thanks to Carsten Bock for the report

Stefan Sayer authored on 15/09/2014 10:47:55
Showing 1 changed files
... ...
@@ -267,12 +267,13 @@ int _trans_layer::send_reply(sip_msg* msg, const trans_ticket* tt,
267 267
     sip_msg* req = t->msg;
268 268
     assert(req);
269 269
 
270
+	    // patch Contact-HF
271
+    vector<string> contact_buf;
270 272
     trsp_socket* local_socket = req->local_socket;
271 273
     if(!local_socket->is_opt_set(trsp_socket::no_transport_in_contact)) {
272 274
 	    cstring trsp(local_socket->get_transport());
273 275
 
274
-	    // patch Contact-HF
275
-	    vector<string> contact_buf(msg->contacts.size());
276
+	    contact_buf.resize(msg->contacts.size());
276 277
 	    vector<string>::iterator contact_buf_it = contact_buf.begin();
277 278
 
278 279
 	    for(list<sip_header*>::iterator contact_it = msg->contacts.begin();