Changeset 6405 for trunk/licq/src/history.cpp
- Timestamp:
- 07/03/08 22:13:49 (5 months ago)
- Files:
-
- 1 modified
-
trunk/licq/src/history.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/src/history.cpp
r6177 r6405 17 17 #include <sys/types.h> 18 18 #include <fcntl.h> 19 #include <string> 19 20 20 21 // Localization … … 39 40 40 41 #define MAX_HISTORY_MSG_SIZE 8192 42 43 using std::string; 41 44 42 45 CUserHistory::CUserHistory() … … 250 253 { 251 254 GET_VALID_LINE_OR_BREAK; 252 unsigned long nUin = atol(&szResult[1]);255 char* id = strdup(&szResult[1]); 253 256 GET_VALID_LINE_OR_BREAK; 254 257 char *szAlias = strdup(&szResult[1]); … … 260 263 char *szEmail = strdup(&szResult[1]); 261 264 GET_VALID_LINES; 262 e = new CEventAuthRequest(nUin, szAlias, szFName, szLName, szEmail, szMsg, 263 nCommand, tTime, nFlags); 265 e = new CEventAuthRequest(id, LICQ_PPID, szAlias, szFName, szLName, 266 szEmail, szMsg, nCommand, tTime, nFlags); 267 free(id); 264 268 free(szAlias); 265 269 free(szFName); … … 271 275 { 272 276 GET_VALID_LINE_OR_BREAK; 273 unsigned long nUin = atol(&szResult[1]); 274 GET_VALID_LINES; 275 e = new CEventAuthGranted(nUin, szMsg, nCommand, tTime, nFlags); 277 char* id = strdup(&szResult[1]); 278 GET_VALID_LINES; 279 e = new CEventAuthGranted(id, LICQ_PPID, szMsg, nCommand, tTime, nFlags); 280 free(id); 276 281 break; 277 282 } … … 279 284 { 280 285 GET_VALID_LINE_OR_BREAK; 281 unsigned long nUin = atol(&szResult[1]); 282 GET_VALID_LINES; 283 e = new CEventAuthRefused(nUin, szMsg, nCommand, tTime, nFlags); 286 char* id = strdup(&szResult[1]); 287 GET_VALID_LINES; 288 e = new CEventAuthRefused(id, LICQ_PPID, szMsg, nCommand, tTime, nFlags); 289 free(id); 284 290 break; 285 291 } … … 287 293 { 288 294 GET_VALID_LINE_OR_BREAK; 289 unsigned long nUin = atol(&szResult[1]);295 char* id = strdup(&szResult[1]); 290 296 GET_VALID_LINE_OR_BREAK; 291 297 char *szAlias = strdup(&szResult[1]); … … 296 302 GET_VALID_LINE_OR_BREAK; 297 303 char *szEmail = strdup(&szResult[1]); 298 e = new CEventAdded(nUin, szAlias, szFName, szLName, szEmail,304 e = new CEventAdded(id, LICQ_PPID, szAlias, szFName, szLName, szEmail, 299 305 nCommand, tTime, nFlags); 306 free(id); 300 307 free(szAlias); 301 308 free(szFName); … … 334 341 ContactList vc; 335 342 bool b = true; 336 unsigned long nUin = 0;343 string id; 337 344 while (true) 338 345 { 339 346 GET_VALID_LINE_OR_BREAK; 340 347 if (b) 341 nUin = atol(&szResult[1]);342 else if ( nUin != 0)343 vc.push_back(new CContact( nUin, &szResult[1]));348 id = &szResult[1]; 349 else if (!id.empty()) 350 vc.push_back(new CContact(id.c_str(), LICQ_PPID, &szResult[1])); 344 351 b = !b; 345 352 }
