diff --git a/server/serverv2.c b/server/serverv2.c index d364a63..f1da057 100644 --- a/server/serverv2.c +++ b/server/serverv2.c @@ -18,7 +18,7 @@ int main(int argc, char **argv) char buff[512]; char name_file[512]; char names_files[512]; - int sdsocket, sdconnection, addrlen, n, x, lenbyt; + int sdsocket, sdconnection, addrlen, n, x, lenbyt, s; sdsocket = socket(AF_INET, SOCK_STREAM, 0); addrlen = sizeof(struct sockaddr_in); @@ -76,8 +76,13 @@ int main(int argc, char **argv) } free(namelist); - send(sdconnection, names_files, 512, 0); - goto start; + if(s = send(sdconnection, names_files, 512, 0) == 512){ + printf("eejo\n"); + goto start; + } + + + } else if (strncmp("SEND", buff, 4) == 0) {