Browse code

corrected get_to_uid - added call to parse_headers(HDR_TO_F)

Vaclav Kubart authored on 15/12/2005 14:39:20
Showing 1 changed files
... ...
@@ -155,6 +155,10 @@ int get_to_uid(str* uid, struct sip_msg* msg)
155 155
 		*uid = val.s;
156 156
 		return 1;
157 157
 	} else {
158
+		if (parse_headers(msg, HDR_TO_F, 0) < 0) {
159
+			LOG(L_ERR, "get_to_uid: Error while parsing To URI (parse_headers)\n");
160
+			return -1;
161
+		}
158 162
 		to = get_to(msg);
159 163
 		if (parse_uri(to->uri.s, to->uri.len, &puri) == -1) {
160 164
 			LOG(L_ERR, "get_to_uid: Error while parsing To URI\n");