r2839 - trunk/libmsip/source/headers
erik at minisip.org
erik at minisip.org
Tue Oct 17 16:19:49 CEST 2006
Author: erik
Date: 2006-10-17 16:19:48 +0200 (Tue, 17 Oct 2006)
New Revision: 2839
Modified:
trunk/libmsip/source/headers/SipHeaderRAck.cxx
Log:
* Bug fix in RAck parsing (it made assumptions on what the whitespace
looked like)
Modified: trunk/libmsip/source/headers/SipHeaderRAck.cxx
===================================================================
--- trunk/libmsip/source/headers/SipHeaderRAck.cxx 2006-10-17 14:12:36 UTC (rev 2838)
+++ trunk/libmsip/source/headers/SipHeaderRAck.cxx 2006-10-17 14:19:48 UTC (rev 2839)
@@ -53,7 +53,7 @@
SipHeaderValueRAck::SipHeaderValueRAck(const string &build_from):SipHeaderValue(SIP_HEADER_TYPE_RACK,sipHeaderValueRAckTypeStr){
unsigned i=0;
unsigned maxi=build_from.size()-1;
- while (build_from[i]==' ')
+ while (i<=maxi && isWS(build_from[i]))
i++;
string respnumstr;
@@ -62,7 +62,7 @@
i++;
}
- while (i<=maxi && build_from[i]==' ')
+ while (i<=maxi && isWS(build_from[i]) )
i++;
string cseqnumstr;
@@ -70,13 +70,12 @@
cseqnumstr+=build_from[i];
i++;
}
+
+ while (i<=maxi && isWS(build_from[i]) )
+ i++;
+ method = build_from.substr(i);
- method="";
- while (!(i>=build_from.length())){
- method+=build_from[i];
- i++;
- }
respnum = atoi((trim(respnumstr)).c_str());
cseqnum = atoi((trim(cseqnumstr)).c_str());
}
More information about the Minisip-devel
mailing list