Advertisement
Guest User

Untitled

a guest
Jan 13th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. int nrbytes;
  2. char *Usercl,*Passcl;
  3. if( read (tdl.cl, &nrbytes, sizeof(int)) <= 0 )
  4. {
  5. printf("[server]Thread - %dn",tdl.idThread);
  6. perror("Read() errorn ");
  7. }
  8.  
  9. Usercl = new char[nrbytes+1];
  10. if( read (tdl.cl, &Usercl, sizeof(nrbytes)) <= 0 )
  11. {
  12. printf("[server]Thread - %dn",tdl.idThread);
  13. perror("Read() errorn ");
  14. }
  15.  
  16. if( read (tdl.cl, &nrbiti, sizeof(int)) <= 0 )
  17. {
  18. printf("[server]Thread - %dn",tdl.idThread);
  19. perror("Read() errorn ");
  20. }
  21. Passcl = new char[nrbytes+1];
  22. if( read (tdl.cl, &Usercl, sizeof(nrbytes)) <= 0 )
  23. {
  24. printf("[server]Thread - %dn",tdl.idThread);
  25. perror("Read() errorn ");
  26. }
  27. printf("[server]Thread - %dn. User:%sn",tdl.idThread,Usercl);
  28. printf("[server]Thread - %dn. Pass:%sn",tdl.idThread,Passcl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement