[IRCServices Coding] Migrating Modules to 5.1...

WILMES Andreas administrator at webspace.ms
Mon Aug 18 16:59:20 PDT 2008


Hy,

I'm migrating my old modules for ircservices-5.1.11, but I've seen that 
there were many changes in the nickgroupinfo_ struct.
"char pass[PASSMAX];" were replaced by "Password pass;", so my module 
won't compile anymore:

modules/nickserv/dbsynch.c: In function `copy_data':
modules/nickserv/dbsynch.c:83: error: incompatible type for argument 1 
of `__builtin_strncpy'


Line of this code:

static void copy_data(MYSQL_ROW row, unsigned long *lengths, NickInfo 
*ni, NickGroupInfo *ngi) {
        char temp[100];
strncpy(ngi->pass, row[field(MYSQL_FIELD_USERINFO_PASSWORD)], PASSMAX < 
lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] ? PASSMAX : 
lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] + 1);
....

When I replace "ngi->pass" by "&ngi->pass" there's only a warning left, 
but by running this function copy_data my services crashes.

Any Ideas?
Regards.