SOCK_LIST * nation_list()
{
SOCK_LIST *nlist;
char buf[MAX_BUFFER];
nlist = AllocList();
sprintf(buf,"SELECT * FROM nations");
db_query("SELECT * FROM nations");
result = mysql_store_result(&mysqlconn);
if(result == NULL) return nlist;
if(mysql_num_rows(result) < 1) return nlist;
while ((row = mysql_fetch_row (result)) != NULL) /* This line is where the problem is */
{
NATION_DATA *n = nation_create();
nation_load(n,atoi( row[0] ));
AttachToList(n,nlist);
n = NULL;
}
db_free();
return nlist;
}
#0 0x00b66ddd in mysql_fetch_row () from /usr/lib/mysql/libmysqlclient.so.15
#1 0x0804f153 in nation_list () at nation.c:75
#2 0x0804f182 in cmd_nation_list (ch=0x83892e0, argument=0x8395323 "") at nation.c:92
#3 0x0804c804 in handle_cmd_input (dsock=0x8391310, arg=0x8395323 "") at interp.c:29
#4 0x08051089 in GameLoop (control=3) at socket.c:181
#5 0x08050e0c in main (argc=1, argv=0xbfac3e64) at socket.c:87
MYSQL_ROW row;
MYSQL_RES *result;