Changeset - b627e6177f20
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-03-11 11:31:02
hanzz.k@gmail.com
Fixed crash in skype handleMemoryUsage
1 file changed with 10 insertions and 6 deletions:
0 comments (0 inline, 0 general)
backends/skype/main.cpp
Show inline comments
 
@@ -129,7 +129,9 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 

	
 
		void handleLoginRequest(const std::string &user, const std::string &legacyName, const std::string &password) {
 
			std::string name = legacyName;
 
			name = name.substr(name.find(".") + 1);
 
			if (name.find("skype.") == 0 || name.find("prpl-skype.") == 0) {
 
				name = name.substr(name.find(".") + 1);
 
			}
 
			LOG4CXX_INFO(logger,  "Creating account with name '" << name << "'");
 

	
 
			Skype *skype = new Skype(user, name, password);
 
@@ -144,11 +146,13 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
			shared = 0;
 
			for(std::map<std::string, Skype *>::const_iterator it = m_sessions.begin(); it != m_sessions.end(); it++) {
 
				Skype *skype = it->second;
 
				double r;
 
				double s;
 
				process_mem_usage(s, r, skype->getPid());
 
				res += r;
 
				shared += s;
 
				if (skype) {
 
					double r;
 
					double s;
 
					process_mem_usage(s, r, skype->getPid());
 
					res += r;
 
					shared += s;
 
				}
 
			}
 
		}
 

	
0 comments (0 inline, 0 general)