| View previous topic :: View next topic |
| Author |
Message |
paef Voice
Joined: 27 Sep 2008 Posts: 3
|
Posted: Tue Aug 10, 2010 10:30 pm Post subject: eggdrop 1.6.20 + SSL patch segfaults with HAVE_NOTIFIERS = 1 |
|
|
As stated in topic, when we have
#define HAVE_TCL_SETNOTIFIER 1
in config the eggdrop segfaults when i try to start it. Traced that to the init_ssl function which sets a threaddata structs ssl part to null.
However when HAVE_TCL_SETNOTIFIER is set this struct doesn't seem to get initiated when looking at the code in main.c.
So to my question is it bad to unset this in config? Will the ssl work if we add another ifndef statement within init_ssl for the part of that function that segfaults.
Codeparts that matter:
main.c:
| Code: |
1033 #ifndef REPLACE_NOTIFIER
1034 init_threaddata(1);
1035 #endif
|
net.c:
| Code: |
144 void init_ssl()
145 {
146 int i;
147 struct threaddata *td = threaddata();
148
149 for (i = 0; i < td->MAXSOCKS; i++) {
150 td->socklist[i].ssl = NULL;
151 }
152 ...........
|
|
|
| Back to top |
|
 |
thommey Halfop
Joined: 01 Apr 2008 Posts: 73
|
Posted: Wed Aug 11, 2010 12:14 pm Post subject: |
|
|
The replacement notifier is a Good Thing. You don't want to undefine that.
init_tcl initializes the threaddata, so it's required to be run before init_ssl.
The main.c:1034 init_threaddata(1); is just required in case the notifier isn't replaced => init_tcl doesn't cause it to be initialized.
So, the solution I propose is moving init_ssl (main.c:1040) a few lines so that init_tcl() is called before it (or vice versa) in the SSL patch. I could reproduce the crash and moving init_ssl to after init_tcl solved it for me. (Maybe report it as bug to the SSL patch author?) |
|
| Back to top |
|
 |
|