From 798da93e1bcda841db14fa628d6985809237d44c Mon Sep 17 00:00:00 2001 From: Abhisha Nirmalathas <a.nirmalathas1@student.unimelb.edu.au> Date: Mon, 13 May 2019 21:13:50 +1000 Subject: [PATCH] debug server --- DiffieHellman.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DiffieHellman.c b/DiffieHellman.c index 548ab18..7326c1b 100644 --- a/DiffieHellman.c +++ b/DiffieHellman.c @@ -122,12 +122,13 @@ int main(int argc, char *argv[]){ while(1){ n = read(sockfd, buffer, 255); printf("read n is %d\n", n); - printf("bufferrr %s\n\n",buffer); + printf("bufferrr %s and size if %d\n\n",buffer, strlen(buffer)); if(!strncmp(buffer,"\n",1)){ + printf("is newline"); buffer[n] = 0; break; } - buffer[n] = 0; + // buffer[n] = 0; } buffer[n] = 0; int responseDiffie = atoi(buffer); -- GitLab