summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2009-10-23 12:24:49 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2009-10-23 12:24:49 +0200
commitcb7acb2533000fcb96ebaf165d08749ffb0782e1 (patch)
tree97cbcf3065f359af720183045bd8f15a19071b31
parentb87dd8b9248da70f683fc07caa1e22cfab5b6ad8 (diff)
TEngineSessionDispatch::generateRespURI(): result of string::find downcasted to sInt16
Another case where comparison against string::npos can't work because if it gets returned, it would be reduced to a smaller integer first. These two cases should actually fails on 32 bit platforms, not just 64 bit.
-rw-r--r--src/Transport_interfaces/engine/enginesessiondispatch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Transport_interfaces/engine/enginesessiondispatch.cpp b/src/Transport_interfaces/engine/enginesessiondispatch.cpp
index d0fa15f..2a4cb99 100644
--- a/src/Transport_interfaces/engine/enginesessiondispatch.cpp
+++ b/src/Transport_interfaces/engine/enginesessiondispatch.cpp
@@ -142,11 +142,11 @@ void TEngineSessionDispatch::generateRespURI(
// include session ID as CGI into RespURI
aRespURI=aLocalURI;
// see if there is already a sessionid in this localURI
- sInt16 n=aRespURI.find(commCfgP->fSessionIDCGIPrefix);
+ string::size_type n=aRespURI.find(commCfgP->fSessionIDCGIPrefix);
if (n!=string::npos) {
n+=commCfgP->fSessionIDCGIPrefix.size(); // char after prefix
// is already there, replace value with new value
- sInt16 m=aRespURI.find_first_of("&?\n\r",n);
+ string::size_type m=aRespURI.find_first_of("&?\n\r",n);
if (m==string::npos)
aRespURI.replace(n,999,aSessionID);
else