From 82243d9beb827fca5708efe9e047ff2fec4bfe8c Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 Oct 2006 09:09:27 +0000 Subject: Tidy up strlens which are not required git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5428 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_httpd.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/modules/m_httpd.cpp') diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 6df26e9c0..189a80b89 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -72,7 +72,6 @@ class HttpSocket : public InspSocket std::string uri; std::string http_version; unsigned int postsize; - unsigned int amount; HTTPTimeout* Timeout; public: @@ -254,7 +253,6 @@ class HttpSocket : public InspSocket { /* Do we need to fetch postdata? */ postdata = ""; - amount = 0; InternalState = HTTP_SERVE_RECV_POSTDATA; std::string header_item; while (headers >> header_item) @@ -286,9 +284,8 @@ class HttpSocket : public InspSocket else if (InternalState == HTTP_SERVE_RECV_POSTDATA) { /* Add postdata, once we have it all, send the event */ - amount += strlen(data); postdata.append(data); - if (amount >= postsize) + if (postdata.length() >= postsize) ServeData(); } else -- cgit v1.3.1-10-gc9f91