vncserver.cc (9330:4a3269a11230) | vncserver.cc (10156:37d20d5c5bed) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 160 unchanged lines hidden (view full) --- 169 listenEvent = new ListenEvent(this, listener.getfd(), POLLIN); 170 pollQueue.schedule(listenEvent); 171} 172 173// attach a vnc client 174void 175VncServer::accept() 176{ | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 160 unchanged lines hidden (view full) --- 169 listenEvent = new ListenEvent(this, listener.getfd(), POLLIN); 170 pollQueue.schedule(listenEvent); 171} 172 173// attach a vnc client 174void 175VncServer::accept() 176{ |
177 // As a consequence of being called from the PollQueue, we might 178 // have been called from a different thread. Migrate to "our" 179 // thread. 180 EventQueue::ScopedMigration migrate(eventQueue()); 181 |
|
177 if (!listener.islistening()) 178 panic("%s: cannot accept a connection if not listening!", name()); 179 180 int fd = listener.accept(true); 181 if (dataFd != -1) { 182 char message[] = "vnc server already attached!\n"; 183 atomic_write(fd, message, sizeof(message)); 184 ::close(fd); --- 516 unchanged lines hidden --- | 182 if (!listener.islistening()) 183 panic("%s: cannot accept a connection if not listening!", name()); 184 185 int fd = listener.accept(true); 186 if (dataFd != -1) { 187 char message[] = "vnc server already attached!\n"; 188 atomic_write(fd, message, sizeof(message)); 189 ::close(fd); --- 516 unchanged lines hidden --- |