Logo Search packages:      
Sourcecode: kmess version File versions  Download package

quint32 KMessShared::generateID (  )  [static]

Generate an random number to use as ID.

For use in MSNP2P, the value will not be below 4

A random value between 4 and RAND_MAX.

Definition at line 277 of file kmessshared.cpp.

Referenced by P2PApplicationBase::sendP2PAckImpl(), P2PApplicationBase::sendP2PMessageImpl(), P2PApplication::sendSlpTransferInvitation(), FileTransferP2P::userStarted1_gotThumbnailResult(), and MsnObjectTransferP2P::userStarted1_UserInvitesContact().

  //return (rand() & 0x00FFFFFC);
  // seed the RNG properly.
  return (rand() + 100); // at least 3 digits for an ID (as per ticket #294??).

Generated by  Doxygen 1.6.0   Back to index