1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices Coding] Migrating Modules to
5.1...
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20Migrating%20Modules%20to%205.1...&In-Reply-To=48AA0CD8.4070503%40webspace.ms">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"003322.html">
11 <LINK REL=
"Next" HREF=
"003324.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices Coding] Migrating Modules to
5.1...
</H1>
16 <A HREF=
"mailto:ircservices-coding%40ircservices.za.net?Subject=%5BIRCServices%20Coding%5D%20Migrating%20Modules%20to%205.1...&In-Reply-To=48AA0CD8.4070503%40webspace.ms"
17 TITLE=
"[IRCServices Coding] Migrating Modules to 5.1...">achurch at achurch.org
19 <I>Tue Aug
19 18:
52:
46 PDT
2008</I>
21 <LI>Previous message:
<A HREF=
"003322.html">[IRCServices Coding] Migrating Modules to
5.1...
23 <LI>Next message:
<A HREF=
"003324.html">[IRCServices Coding] Migrating Modules to
5.1...
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#3323">[ date ]
</a>
27 <a href=
"thread.html#3323">[ thread ]
</a>
28 <a href=
"subject.html#3323">[ subject ]
</a>
29 <a href=
"author.html#3323">[ author ]
</a>
34 <PRE>Passwords are no longer stored as simple strings, since each password
35 can be encrypted with a different method (cipher). To save data from
36 a Password structure, you need to save both the contents of
37 Password.password (as a binary buffer, not a string) and the string
38 pointed to by Password.cipher (which may be NULL). To restore a
39 Password structure, fill in the password and cipher fields in a
40 temporary variable, then use copy_password() to copy the data to the
41 destination Password structure.
44 <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">achurch at achurch.org
</A>
45 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
49 </I>><i>I'm migrating my old modules for ircservices-
5.1.11, but I've seen that
50 </I>><i>there were many changes in the nickgroupinfo_ struct.
51 </I>><i>"char pass[PASSMAX];
" were replaced by
"Password pass;
", so my module
52 </I>><i>won't compile anymore:
54 </I>><i>modules/nickserv/dbsynch.c: In function `copy_data':
55 </I>><i>modules/nickserv/dbsynch.c:
83: error: incompatible type for argument
1
56 </I>><i>of `__builtin_strncpy'
59 </I>><i>Line of this code:
61 </I>><i>static void copy_data(MYSQL_ROW row, unsigned long *lengths, NickInfo
62 </I>><i>*ni, NickGroupInfo *ngi) {
63 </I>><i> char temp[
100];
64 </I>><i>strncpy(ngi-
>pass, row[field(MYSQL_FIELD_USERINFO_PASSWORD)], PASSMAX
<
65 </I>><i>lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] ? PASSMAX :
66 </I>><i>lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] +
1);
69 </I>><i>When I replace
"ngi-
>pass
" by
"&ngi-
>pass
" there's only a warning left,
70 </I>><i>but by running this function copy_data my services crashes.
74 </I>><i>------------------------------------------------------------------
75 </I>><i>To unsubscribe or change your subscription options, visit:
76 </I>><i><A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
</A>
84 <LI>Previous message:
<A HREF=
"003322.html">[IRCServices Coding] Migrating Modules to
5.1...
86 <LI>Next message:
<A HREF=
"003324.html">[IRCServices Coding] Migrating Modules to
5.1...
88 <LI> <B>Messages sorted by:
</B>
89 <a href=
"date.html#3323">[ date ]
</a>
90 <a href=
"thread.html#3323">[ thread ]
</a>
91 <a href=
"subject.html#3323">[ subject ]
</a>
92 <a href=
"author.html#3323">[ author ]
</a>