Fix crash in chat window on disconnected client

(upstream git commit ea45371bda1aa96fe63967c15e360b11d9d84bbd)

Fix bad #define
(upstream git commit b2ff838be24f5effae9ac4b75bd1897b710a60dc)
This commit is contained in:
dcoppa 2011-12-27 11:51:37 +00:00
parent cd539661c6
commit 6409197fe1
4 changed files with 46 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.27 2011/12/11 18:31:13 dcoppa Exp $
# $OpenBSD: Makefile,v 1.28 2011/12/27 11:51:37 dcoppa Exp $
COMMENT-main = another eDonkey P2P file sharing client
COMMENT-web = webserver interface to amuled
@ -6,7 +6,7 @@ COMMENT-daemon =stand-alone daemon/cmdline for amule
V = 2.3.1
DISTNAME = aMule-$V
REVISION = 0
REVISION = 1
CATEGORIES = net
HOMEPAGE = http://www.amule.org/

View File

@ -1,4 +1,7 @@
$OpenBSD: patch-m4_libpng_m4,v 1.1 2011/11/28 15:28:49 dcoppa Exp $
$OpenBSD: patch-m4_libpng_m4,v 1.2 2011/12/27 11:51:37 dcoppa Exp $
Fix configure of libpng when sh != bash
--- m4/libpng.m4.orig Mon Nov 28 09:58:11 2011
+++ m4/libpng.m4 Mon Nov 28 10:00:37 2011
@@ -95,9 +95,9 @@ m4_define([REQUIRED_VERSION_MICRO], [m4_bregexp(REQUIR

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-src_ChatSelector_cpp,v 1.1 2011/12/27 11:51:37 dcoppa Exp $
Fix crash in chat window on disconnected client
(upstream git commit ea45371bda1aa96fe63967c15e360b11d9d84bbd)
--- src/ChatSelector.cpp.orig Mon Jun 13 10:50:25 2011
+++ src/ChatSelector.cpp Tue Dec 27 10:47:03 2011
@@ -352,11 +352,13 @@ bool CChatSelector::GetCurrentClient(CClientRef& clien
// Get the client that the session is open to
if (ci) {
- clientref.Link(theApp->clientlist->FindClientByIP(IP_FROM_GUI_ID(ci->m_client_id), PORT_FROM_GUI_ID(ci->m_client_id)) CLIENT_DEBUGSTRING("CChatSelector::GetCurrentClient"));
- return true;
- } else {
- return false;
+ CUpDownClient * client = theApp->clientlist->FindClientByIP(IP_FROM_GUI_ID(ci->m_client_id), PORT_FROM_GUI_ID(ci->m_client_id));
+ if (client) {
+ clientref.Link(client CLIENT_DEBUGSTRING("CChatSelector::GetCurrentClient"));
+ return true;
+ }
}
+ return false;
}
#endif

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-src_include_common_Constants_h,v 1.1 2011/12/27 11:51:37 dcoppa Exp $
Fix bad #define (git commit b2ff838be24f5effae9ac4b75bd1897b710a60dc)
--- src/include/common/Constants.h.orig Tue Dec 27 10:44:55 2011
+++ src/include/common/Constants.h Tue Dec 27 10:45:22 2011
@@ -24,7 +24,7 @@
//
#ifndef COMMONCONSTANTS_H
-#define COMMONMACROS_H
+#define COMMONCONSTANTS_H
const unsigned UNLIMITED = 0;