[prev in list] [next in list] [prev in thread] [next in thread]
List: proftpd-devel
Subject: [Proftpd-devel] API Function && call_module_cmd
From: "Roderick Groesbeek" <proftpd () roderick ! triple-it ! nl>
Date: 2004-02-02 21:40:23
Message-ID: 002f01c3e9d5$2a68c140$6702a8c0 () Roderick
[Download RAW message or body]
Good(morning|dag|evening),
Info:
===
Collegue of mine was rebuilding a Proftpd SRPM, to let it use
mod_quotatab_sql,
but could not get the binary linked.
Quick Story:
=========
- Documentation still references call_module_cmd()
http://www.castaglia.org/proftpd/doc/devel-guide/api/functions.html
- Modules still use call_module_cmd()
Question:
=======
Who can I contact to make the appropriate changes?
----------------------------------------------------------------------------
--
Long Story:
========
I had a quick look at it and discovered..
Discovery:
=======
- Missing call_module_cmd() function call.
~~
[rgroesb@shix01 proftpd-1.2.9]$ grep -in call_module_cmd src/modules.c
[rgroesb@shix01 proftpd-1.2.9]$ grep -in call_module src/modules.c
409:modret_t *call_module(module *m, modret_t *(*func)(cmd_rec *), cmd_rec
*cmd) {
[rgroesb@shix01 proftpd-1.2.9]$
~~
- Described nice in the Changelog however
~~
2003-09-07 17:31 castaglia
* include/modules.h, src/modules.c:
Removing cruft. The call_module_auth() and call_module_cmd()
functions were duplicates of call_module(), so there is no need to
keep them around. Also fixed some of the pools being used when
adding symbols to the stash. Fixed a bug where the stash pool was
not being properly allocated from permanent_pool (valgrind found
this).
~~
But somehow the old references still keep lingering around:
Old references:
===========
I see it is still described at
http://www.castaglia.org/proftpd/doc/devel-guide/api/functions.html
~~
call_module_cmd
Declaration:
modret_t *call_module_cmd(module *m, modret_t *(*func)(cmd_rec *), cmd_rec
*cmd)
Source File: src/modules.c
~~
And I made a patch to the mod_quotatab_sql.c file
~~
[rgroesb@shix01 proftpd-1.2.9]$ more ../mod_quotatab_sql.patch
*** proftpd-1.2.9/modules/mod_quotatab_sql.c.orig 2004-02-02
16:51:29.0000
00000 +0100
--- proftpd-1.2.9/modules/mod_quotatab_sql.c 2004-02-02
16:52:32.000000000 +0
100
***************
*** 132,138 ****
}
/* Call the handler. */
! sql_res = call_module_cmd(sql_cmdtab->m, sql_cmdtab->handler, sql_cmd);
/* Check the results. */
if (MODRET_ISERROR(sql_res)) {
--- 132,139 ----
}
/* Call the handler. */
! //[Unk] sql_res = call_module_cmd(sql_cmdtab->m, sql_cmdtab->handler,
sql_cm
d);
! sql_res = call_module(sql_cmdtab->m, sql_cmdtab->handler, sql_cmd);
/* Check the results. */
if (MODRET_ISERROR(sql_res)) {
***************
*** 180,186 ****
quota_type == class_quota ? "class" : "all");
/* Call the handler. */
! sql_res = call_module_cmd(sql_cmdtab->m, sql_cmdtab->handler, sql_cmd);
/* Check the results. */
if (!sql_res || MODRET_ISERROR(sql_res)) {
--- 181,188 ----
quota_type == class_quota ? "class" : "all");
/* Call the handler. */
! //[Unk] sql_res = call_module_cmd(sql_cmdtab->m, sql_cmdtab->handler,
sql_cmd);
! sql_res = call_module(sql_cmdtab->m, sql_cmdtab->handler, sql_cmd);
/* Check the results. */
if (!sql_res || MODRET_ISERROR(sql_res)) {
***************
*** 415,421 ****
}
/* Call the handler. */
! sql_res = call_module_cmd(sql_cmdtab->m, sql_cmdtab->handler, sql_cmd);
/* Check the results. */
if (MODRET_ISERROR(sql_res)) {
--- 417,424 ----
}
/* Call the handler. */
! //[Unk] sql_res = call_module_cmd(sql_cmdtab->m, sql_cmdtab->handler,
sql_cmd);
! sql_res = call_module(sql_cmdtab->m, sql_cmdtab->handler, sql_cmd);
/* Check the results. */
if (MODRET_ISERROR(sql_res)) {
[rgroesb@shix01 proftpd-1.2.9]$
~~
Suggestion:
========
Maybe a nice suggestion would be to introduce the call_module_cmd() as a
macro
to call_module()?
Vriendelijke Groet,
Roderick
--
Pettemerstraat 12A T r I p l e
1823 CW Alkmaar T
Tel. +31 (0)72-5129516
fax. +31 (0)72-5129520 Automatisering
www.triple-it.nl "Laat uw Net Werken!"
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
ProFTPD Developers List
<proftpd-devel@proftpd.org>
https://lists.sourceforge.net/lists/listinfo/proftp-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic