diff options
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -144,9 +144,9 @@ void *reply_thread_routine(void* args) { exit(1); } buf[recvbytes] = '\0'; - printf("client: received %d bytes on a reply call \n", recvbytes); + // printf("client: received %d bytes on a reply call \n", recvbytes); // print the two first field of the call - printf("client: replyType: %d, stringSize: %d\n", buf[0], buf[1]); + // printf("client: replyType: %d, stringSize: %d\n", buf[0], buf[1]); // print the while buffer by char for (int i = 0; i < recvbytes; i++) { printf("%c ", buf[i]); @@ -155,8 +155,8 @@ void *reply_thread_routine(void* args) { memcpy(&reply, buf, 2); // print out the fields of reply on one line - printf("\nclient: replyType: %d, stringSize: %d\n", reply.replyType, reply.stringSize); - + // printf("\nclient: replyType: %d, stringSize: %d\n", reply.replyType, reply.stringSize); + if (reply.replyType == 2) { struct Welcome msg; // recv the message, check for errors too @@ -167,13 +167,13 @@ void *reply_thread_routine(void* args) { // print the size of reply if (reply.replyType == 3) { - printf("client: received an announce message\n"); + // printf("client: received an announce message\n"); char *song_name = malloc(reply.stringSize); // printf(sizeof(struct Reply)); memcpy(song_name, buf + 2, reply.stringSize); - printf("client: song name: %s\n", song_name); + printf("New song announced: %s\n", song_name); free(song_name); |