Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#8409) CVS version will not compile
Home

[Freeciv-Dev] Re: (PR#8409) CVS version will not compile

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: andrearo@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8409) CVS version will not compile
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 28 Mar 2004 01:00:04 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8409 >

On Sun, Mar 28, 2004 at 12:15:39AM -0800, andrearo@xxxxxxxxxxxx wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8409 >
> 
> I'm not able to compile the latest CVS version.
> 
> I ran:
> 
> ./autogen.sh --enable-client=gtk-2.0 --enable-auth
> make
> 
> and then got:
> 
> connecthand.c: In function `handle_login_request':
> connecthand.c:336: warning: implicit declaration of function
> `dsend_packet_authe ntication_req'
> connecthand.c: In function `handle_authentication_reply':
> connecthand.c:423: error: structure has no member named `password'
> 
> connecthand.c:440: error: structure has no member named `password'
> connecthand.c:440: error: structure has no member named `password'
> make[3]: *** [connecthand.o] Error 1
> make[3]: Leaving directory `/home/andreas/devel/freeciv-auth/server'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/andreas/devel/freeciv-auth/server'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/andreas/devel/freeciv-auth'
> make: *** [all-recursive-am] Error 2
> 
> When fixing this error, I just get more errors elsewhere...
> Is this a known problem?

No. There are two errors. The first was caused by me with the recent
changes of generate_packets. The second is there since the
introduction of the delta patch.

Mike please take a look and commit.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The two rules for success in life are:
  1) Never tell them everything you know."

Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.13
diff -u -u -r1.13 packets.def
--- common/packets.def  22 Mar 2004 20:58:11 -0000      1.13
+++ common/packets.def  28 Mar 2004 08:56:24 -0000
@@ -250,7 +250,7 @@
   CONNECTION conn_id;
 end
 
-PACKET_AUTHENTICATION_REQ=6;sc,handle-per-conn
+PACKET_AUTHENTICATION_REQ=6;sc,handle-per-conn,dsend
   AUTH_TYPE type;
   STRING message[MAX_LEN_MSG]; /* explain to the client if there's a problem */
 end
Index: common/packets_gen.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets_gen.c,v
retrieving revision 1.14
diff -u -u -r1.14 packets_gen.c
--- common/packets_gen.c        22 Mar 2004 20:58:11 -0000      1.14
+++ common/packets_gen.c        28 Mar 2004 08:56:29 -0000
@@ -1247,6 +1247,16 @@
   }
 }
 
+int dsend_packet_authentication_req(struct connection *pc, enum 
authentication_type type, const char *message)
+{
+  struct packet_authentication_req packet, *real_packet = &packet;
+
+  real_packet->type = type;
+  sz_strlcpy(real_packet->message, message);
+  
+  return send_packet_authentication_req(pc, real_packet);
+}
+
 static unsigned int hash_packet_authentication_reply_100(const void *vkey, 
unsigned int num_buckets)
 {
   return 0;
Index: common/packets_gen.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets_gen.h,v
retrieving revision 1.11
diff -u -u -r1.11 packets_gen.h
--- common/packets_gen.h        22 Mar 2004 20:58:11 -0000      1.11
+++ common/packets_gen.h        28 Mar 2004 08:56:29 -0000
@@ -1094,6 +1094,7 @@
 
 struct packet_authentication_req *receive_packet_authentication_req(struct 
connection *pc, enum packet_type type);
 int send_packet_authentication_req(struct connection *pc, const struct 
packet_authentication_req *packet);
+int dsend_packet_authentication_req(struct connection *pc, enum 
authentication_type type, const char *message);
 
 struct packet_authentication_reply *receive_packet_authentication_reply(struct 
connection *pc, enum packet_type type);
 int send_packet_authentication_reply(struct connection *pc, const struct 
packet_authentication_reply *packet);
Index: server/connecthand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/connecthand.c,v
retrieving revision 1.17
diff -u -u -r1.17 connecthand.c
--- server/connecthand.c        15 Dec 2003 21:25:46 -0000      1.17
+++ server/connecthand.c        28 Mar 2004 08:56:31 -0000
@@ -420,7 +420,7 @@
 
     /* the new password is good, create a database entry for
      * this user; we establish the connection in handle_db_lookup */
-    sz_strlcpy(pconn->password, password);
+    sz_strlcpy(pconn->server.password, password);
 
     switch(user_db_save(pconn)) {
     case USER_DB_SUCCESS:
@@ -437,7 +437,7 @@
 
     establish_new_connection(pconn);
   } else if (pconn->server.status == AS_REQUESTING_OLD_PASS) { 
-    if (strncmp(pconn->password, password, MAX_LEN_NAME) == 0) {
+    if (strncmp(pconn->server.password, password, MAX_LEN_NAME) == 0) {
       pconn->server.status = AS_ESTABLISHED;
       establish_new_connection(pconn);
     } else {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#8409) CVS version will not compile, Raimar Falke <=