From b23cc15d3bdb38b77c7c885cfe0791ae71965922 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Mon, 6 Jan 2014 21:56:21 +0000 Subject: [PATCH] git-svn-id: svn://imanolbarba.net/PAD@44 c2ee353e-ed0d-4329-bf56-03aec153487f --- JChatServerV2/bin/pad/prac2/JChat$1.class | Bin 774 -> 0 bytes JChatServerV2/bin/pad/prac2/JChat.class | Bin 866 -> 0 bytes JChatServerV2/src/pad/prac2/JChat.java | 9 ++------- QChatClient/chatroom.cpp | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/JChatServerV2/bin/pad/prac2/JChat$1.class b/JChatServerV2/bin/pad/prac2/JChat$1.class index d203d50..e8fef6f 100644 Binary files a/JChatServerV2/bin/pad/prac2/JChat$1.class and b/JChatServerV2/bin/pad/prac2/JChat$1.class differ diff --git a/JChatServerV2/bin/pad/prac2/JChat.class b/JChatServerV2/bin/pad/prac2/JChat.class index 3f22a28..5c8923a 100644 Binary files a/JChatServerV2/bin/pad/prac2/JChat.class and b/JChatServerV2/bin/pad/prac2/JChat.class differ diff --git a/JChatServerV2/src/pad/prac2/JChat.java b/JChatServerV2/src/pad/prac2/JChat.java index 02d7663..a906273 100644 --- a/JChatServerV2/src/pad/prac2/JChat.java +++ b/JChatServerV2/src/pad/prac2/JChat.java @@ -8,19 +8,14 @@ public class JChat { String ip; int port, roomSize; - /*Scanner in = new Scanner(System.in); + Scanner in = new Scanner(System.in); System.out.print("IP: "); ip = in.nextLine(); System.out.print("Port: "); port = in.nextInt(); System.out.print("Size of chatroom: "); roomSize = in.nextInt(); - in.close();*/ - - ip = "localhost"; - port = 3001; - roomSize = 5; - + in.close(); final Server serv = new Server(ip,port,roomSize); Runtime.getRuntime().addShutdownHook(new Thread() { diff --git a/QChatClient/chatroom.cpp b/QChatClient/chatroom.cpp index 9895005..85e802c 100644 --- a/QChatClient/chatroom.cpp +++ b/QChatClient/chatroom.cpp @@ -48,7 +48,6 @@ void sendThread(Socket* s, Chatroom* chat) { break; } - } catch(SocketException& e) { @@ -389,6 +388,7 @@ void Chatroom::startSession() Chatroom::~Chatroom() { delete msgLock; + delete chatLock; delete recv; delete send; map::iterator it; -- libgit2 0.22.2