From owner-freebsd-ports Wed Jul 19 23: 5:33 2000 Delivered-To: freebsd-ports@freebsd.org Received: from osku.suutari.iki.fi (osku.syncrontech.com [213.28.98.4]) by hub.freebsd.org (Postfix) with ESMTP id 2F7B637BAAB for ; Wed, 19 Jul 2000 23:05:27 -0700 (PDT) (envelope-from ari@suutari.iki.fi) Received: from coffee (adsl-nat.syncrontech.com [213.28.98.3]) by osku.suutari.iki.fi (8.9.3/8.9.3) with SMTP id JAA50044; Thu, 20 Jul 2000 09:05:02 +0300 (EEST) (envelope-from ari@suutari.iki.fi) Message-ID: <000601bff210$9ff475a0$0e05a8c0@intranet.syncrontech.com> From: "Ari Suutari" To: Cc: Subject: FreeBSD Port: kannel-0.10.2 Date: Thu, 20 Jul 2000 09:06:17 +0300 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0003_01BFF229.C39424B0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. ------=_NextPart_000_0003_01BFF229.C39424B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, I just tried kannel-0.10.2 port. Compiles OK, but segfaults after mobile phone requests a page. I can think of two things that I have used with kannel that don't exist in port: 1) I have configured it with $ CFLAGS="-pthread" ./configure to get -pthread flag to compiler. 2) On FreeBSD the pthread stack default size seems to be 64k, which is too little for kannel. I'll attach a patch to fix this one. With these two changes I have been able to use kannel to view our application pages with mobile phones. Ari S. -- Ari Suutari Lemi, Finland ------=_NextPart_000_0003_01BFF229.C39424B0 Content-Type: application/octet-stream; name="gwthread-pthread.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gwthread-pthread.diff" *** gwthread-pthread.c.orig Tue Jul 18 15:08:24 2000 --- gwthread-pthread.c Wed Jul 19 13:23:39 2000 *************** *** 58,63 **** --- 58,68 ---- pthread_key_t tsd_key; pthread_mutex_t threadtable_lock; + /* + * Thread creation parameters. + */ + static pthread_attr_t thread_attr; + #define MIN_THREAD_STACK_SIZE (256 * 1024) static void lock(void) { int ret; *************** *** 172,177 **** --- 177,183 ---- void gwthread_init(void) { int ret; int i; + int stack_size; pthread_mutex_init(&threadtable_lock, NULL); *************** *** 184,189 **** --- 190,202 ---- threadtable[i] = NULL; } active_threads = 0; + /* + * Make sure that thread stack is large enough. + */ + pthread_attr_init(&thread_attr); + pthread_attr_getstacksize(&thread_attr, &stack_size); + if (stack_size < MIN_THREAD_STACK_SIZE) + pthread_attr_setstacksize(&thread_attr, MIN_THREAD_STACK_SIZE); create_threadinfo_main(); } *************** *** 285,291 **** return -1; } ! ret = pthread_create(&id, NULL, &new_thread, p); if (ret != 0) { unlock(); error(ret, "Could not create new thread."); --- 298,304 ---- return -1; } ! ret = pthread_create(&id, &thread_attr, &new_thread, p); if (ret != 0) { unlock(); error(ret, "Could not create new thread."); ------=_NextPart_000_0003_01BFF229.C39424B0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message