- Timestamp:
- 07/02/08 06:04:48 (5 months ago)
- Files:
-
- 1 modified
-
trunk/rms/src/rms.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rms/src/rms.cpp
r6379 r6389 794 794 //XXX Handle the case when we have the owner 795 795 if (szId == 0) 796 m_nUin = gUserManager.OwnerUin();796 m_nUin = strtoul(gUserManager.OwnerId(LICQ_PPID).c_str(), (char**)NULL, 10); 797 797 798 798 // Print the user info … … 1485 1485 fprintf(fs, "%d User not added\n", CODE_ADDUSERxERROR); 1486 1486 } 1487 1487 1488 free(szId); 1488 1489 return fflush(fs); 1489 1490 } … … 1504 1505 if (nUin >= 10000) 1505 1506 { 1506 licqDaemon->RemoveUserFromList( nUin);1507 licqDaemon->RemoveUserFromList(data_arg, LICQ_PPID); 1507 1508 fprintf(fs, "%d User removed\n", CODE_REMUSERxDONE); 1508 1509 } … … 1533 1534 return fflush(fs); 1534 1535 } 1535 1536 1537 if (isdigit(*data_arg)) 1538 { 1539 nUin = strtoul(data_arg, (char**)NULL, 10); 1540 while (*data_arg != '\0' && *data_arg != ' ') data_arg++; 1541 NEXT_WORD(data_arg); 1542 } 1543 else 1536 1537 if (!isdigit(*data_arg)) 1544 1538 { 1545 1539 fprintf(fs, "%d Invalid UIN.\n", CODE_INVALIDxUSER); 1546 1540 return fflush(fs); 1547 1541 } 1542 char* id = strdup(data_arg); 1543 nUin = strtoul(data_arg, (char**)NULL, 10); 1544 while (*data_arg != '\0' && *data_arg != ' ') data_arg++; 1545 NEXT_WORD(data_arg); 1548 1546 1549 1547 if (nUin < 10000) … … 1556 1554 { 1557 1555 fprintf(fs, "%d Opening secure connection.\n", CODE_SECURExOPEN); 1558 licqDaemon->icqOpenSecureChannel( nUin);1556 licqDaemon->icqOpenSecureChannel(id); 1559 1557 } 1560 1558 else … … 1562 1560 { 1563 1561 fprintf(fs, "%d Closing secure connection.\n", CODE_SECURExCLOSE); 1564 licqDaemon->icqCloseSecureChannel( nUin);1562 licqDaemon->icqCloseSecureChannel(id); 1565 1563 } 1566 1564 else 1567 1565 { 1568 ICQUser *u = gUserManager.FetchUser(nUin,LOCK_R);1566 ICQUser* u = gUserManager.FetchUser(id, LICQ_PPID, LOCK_R); 1569 1567 if (u->Secure() == 0) 1570 1568 { … … 1577 1575 gUserManager.DropUser(u); 1578 1576 } 1579 1580 return fflush(fs); 1581 } 1577 1578 free(id); 1579 return fflush(fs); 1580 }
