View Issue Details

IDProjectCategoryView StatusLast Update
0003345unrealircdpublic2007-06-12 14:39
ReporterfezAssigned Tostskeeps 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformx86OSWindowsOS VersionXP
Product Version3.3-alpha0 
Target VersionFixed in Version3.3-alpha0 
Summary0003345: Fixed compile errors and runtime errors.
Descriptionbugs fixed by fez:


1. makefile.win32:146 - removed src/lusers.obj
justification: lusers.c no longer exists in 3.3


2. makefile.win32:299: removed src/lusrc.obj chunk
justification: lusers.c no longer exists in 3.3


3. src/s_serv.c:659: moved extern void reinit_ssl(aClient *) to beginning of file inside #ifdef USE_SSL block
justification:
function declarations should appear before executable code in C.


4. src/modules/m_chghost:156: moved DYN_LOCAL declaration to beginning of block (where it should have been), and added appropriate DYN_FREE in first if block thereafter.
justification:
variable declarations must be at the top of a code block in C.


5. src/modules/m_chgident:168: moved DYN_LOCAL declaration to beginning of block (where it should have been), and added appropriate DYN_FREE in first if block thereafter.
justification: see above


6. src/s_conf.c:5736: recommend adding "|O_CREAT|O_APPEND" to "open" statement, otherwise user must EXPLICITLY create logfile before IRCD will start.
justification:
not having those flags means the user must explicitly create the logfile before unreal will start.


7. src/ssl.c:209: moved ret = PEM_read_DHparams(dhpfile, NULL, NULL, NULL); inside if (dhpfile != NULL) block. Also moved the if (SSL_CTX_set_tmp_dh(ctx_client, ret) < 0) block at the end of the same if block.
justification: no point in doing DHparams stuff if x_dh_pem is not set, also caused crash in win32 (trying to read from NULL file pointer).


8. src/ssl.c:...: did the same as above inside init_ctx_client (above was init_ctx_server)
justification: see above


9. wircd.def: removed the following external symbols:
    add_local_domain
    check_channelmask
    free_class
    init_ircstats
    m_botmotd
    m_motd
    m_opermotd
    make_class
Justification:
        they made nmake freak out.
    I'm not sure if they're necessary or not and would welcome feedback as to the harms of removing them.



NOTES:

I'd like someone who's an expert at SSL to verify the sanity of #7 and 0000008. I believe it should work

And I'd REALLY like someone who knows the API in and out to verify #9. If those things ARE needed in the wircd.def then they need to be resolved somehow. Probably wouldn't take much work...


YAY, now Unreal3.3 compiles and runs on Windows!
TagsNo tags attached.
3rd party modules

Relationships

related to 0003338 resolvedstskeeps Update win32 makefile 

Activities

fez

2007-05-18 00:13

reporter   ~0014159

To illustrate what I mean by #7 and 0000008:
both #7 and 0000008 refer to identical code at different parts of the file


OLD CODE:

    ret = PEM_read_DHparams(dhpfile, NULL, NULL, NULL);
    if (dhpfile != NULL)
    {
        fclose(dhpfile);
    }
    if (SSL_CTX_set_tmp_dh(ctx_server, ret) < 0)
    {
        mylog("Failed to use DH parameters %s", iConf.x_dh_pem);
        goto fail;
    }


NEW CODE:

    if (dhpfile != NULL)
    {
        ret = PEM_read_DHparams(dhpfile, NULL, NULL, NULL);
        fclose(dhpfile);
        if (SSL_CTX_set_tmp_dh(ctx_server, ret) < 0)
        {
            mylog("Failed to use DH parameters %s", iConf.x_dh_pem);
            goto fail;
        }
    }

fez

2007-05-18 00:18

reporter   ~0014160

To illustrate what I mean by #4 and #5:
Both refer to identical code blocks in different files

OLD CODE:

    {
        if (MyClient(sptr) && (IsLocOp(sptr) && !MyClient(acptr)))
        {
            sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name,
                parv[0]);
            return 0;
        }

        DYN_LOCAL(char, did_parts, acptr->user->joined);


NEW CODE:

    {
        DYN_LOCAL(char, did_parts, acptr->user->joined);

        if (MyClient(sptr) && (IsLocOp(sptr) && !MyClient(acptr)))
        {
            sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name,
                parv[0]);
            DYN_FREE(did_parts);
            return 0;
        }

Stealth

2007-05-18 01:10

reporter   ~0014161

lol, related to 0003338

stskeeps

2007-05-18 01:57

reporter   ~0014163

There is a line in the top of wircd.def - could I get you to run that and run it through src/win32/def-clean.c so we get the symbols file updated?

w00t

2007-05-18 03:34

reporter   ~0014165

Just to chime in here...

All those symbols were removed a while ago, through recent commits.

2007-05-18 13:50

 

Unreal3.3.zip (31,974 bytes)

fez

2007-05-18 13:51

reporter   ~0014170

I attached the file Unreal3.3.zip with the modified files. Also note: in makefile.win32 I edited the default openssl dir to c:\dev\openssl for consistency with c:\dev\curl and c:\dev\zlib.

stskeeps

2007-06-12 14:39

reporter   ~0014340

Was fixed in .2408

Issue History

Date Modified Username Field Change
2007-05-18 00:08 fez New Issue
2007-05-18 00:13 fez Note Added: 0014159
2007-05-18 00:18 fez Note Added: 0014160
2007-05-18 01:10 Stealth Note Added: 0014161
2007-05-18 01:57 stskeeps Note Added: 0014163
2007-05-18 02:01 stskeeps Relationship added related to 0003338
2007-05-18 02:11 stskeeps Status new => acknowledged
2007-05-18 03:34 w00t Note Added: 0014165
2007-05-18 13:50 fez File Added: Unreal3.3.zip
2007-05-18 13:51 fez Note Added: 0014170
2007-06-12 14:39 stskeeps Status acknowledged => resolved
2007-06-12 14:39 stskeeps Fixed in Version => 3.3-alpha0
2007-06-12 14:39 stskeeps Resolution open => fixed
2007-06-12 14:39 stskeeps Assigned To => stskeeps
2007-06-12 14:39 stskeeps Note Added: 0014340