]> jfr.im git - irc.git/blob - software/RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2008/003323.html
rename -> *.git
[irc.git] / software / RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2008 / 003323.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices Coding] Migrating Modules to 5.1...
5 </TITLE>
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">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices Coding] Migrating Modules to 5.1...</H1>
15 <B>Andrew Church</B>
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
18 </A><BR>
19 <I>Tue Aug 19 18:52:46 PDT 2008</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="003322.html">[IRCServices Coding] Migrating Modules to 5.1...
22 </A></li>
23 <LI>Next message: <A HREF="003324.html">[IRCServices Coding] Migrating Modules to 5.1...
24 </A></li>
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>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
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.
42
43 --Andrew Church
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>
46
47 &gt;<i>Hy,
48 </I>&gt;<i>
49 </I>&gt;<i>I'm migrating my old modules for ircservices-5.1.11, but I've seen that
50 </I>&gt;<i>there were many changes in the nickgroupinfo_ struct.
51 </I>&gt;<i>&quot;char pass[PASSMAX];&quot; were replaced by &quot;Password pass;&quot;, so my module
52 </I>&gt;<i>won't compile anymore:
53 </I>&gt;<i>
54 </I>&gt;<i>modules/nickserv/dbsynch.c: In function `copy_data':
55 </I>&gt;<i>modules/nickserv/dbsynch.c:83: error: incompatible type for argument 1
56 </I>&gt;<i>of `__builtin_strncpy'
57 </I>&gt;<i>
58 </I>&gt;<i>
59 </I>&gt;<i>Line of this code:
60 </I>&gt;<i>
61 </I>&gt;<i>static void copy_data(MYSQL_ROW row, unsigned long *lengths, NickInfo
62 </I>&gt;<i>*ni, NickGroupInfo *ngi) {
63 </I>&gt;<i> char temp[100];
64 </I>&gt;<i>strncpy(ngi-&gt;pass, row[field(MYSQL_FIELD_USERINFO_PASSWORD)], PASSMAX &lt;
65 </I>&gt;<i>lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] ? PASSMAX :
66 </I>&gt;<i>lengths[field(MYSQL_FIELD_USERINFO_PASSWORD)] + 1);
67 </I>&gt;<i>....
68 </I>&gt;<i>
69 </I>&gt;<i>When I replace &quot;ngi-&gt;pass&quot; by &quot;&amp;ngi-&gt;pass&quot; there's only a warning left,
70 </I>&gt;<i>but by running this function copy_data my services crashes.
71 </I>&gt;<i>
72 </I>&gt;<i>Any Ideas?
73 </I>&gt;<i>Regards.
74 </I>&gt;<i>------------------------------------------------------------------
75 </I>&gt;<i>To unsubscribe or change your subscription options, visit:
76 </I>&gt;<i><A HREF="http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding">http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding</A>
77 </I></PRE>
78
79
80 <!--endarticle-->
81 <HR>
82 <P><UL>
83 <!--threads-->
84 <LI>Previous message: <A HREF="003322.html">[IRCServices Coding] Migrating Modules to 5.1...
85 </A></li>
86 <LI>Next message: <A HREF="003324.html">[IRCServices Coding] Migrating Modules to 5.1...
87 </A></li>
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>
93 </LI>
94 </UL>
95
96 </body></html>