ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostUpdate/HostUpdate.cpp
(Generate patch)

Comparing HostUpdate/HostUpdate.cpp (file contents):
Revision 22 by Douglas Thrift, 2003-11-10T23:58:38-08:00 vs.
Revision 23 by Douglas Thrift, 2003-11-11T00:36:02-08:00

# Line 128 | Line 128 | void HostUpdate::update(const string& ag
128          string host = itor->second, name = sgetenv("REMOTE_HOST"), address =
129             sgetenv("REMOTE_ADDR");
130  
131 <        string::size_type begin = agent.find('(') + 1, end = agent.find(')',
132 <                begin);
131 >        string::size_type begin = agent.find('(') + 1, end = agent.rfind(')');
132 >
133 >        if (begin >= end) return;
134 >
135          string platform = agent.substr(begin, end - begin);
136  
137          Host client(host, name, address, platform), saved(host);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines