Ticket #39 (closed Bug: fixed)

Opened 3 years ago

Last modified 10 months ago

Reversed IP Addresses in Contact Listing (recently changed to cause this [accidental?])

Reported by: bluecrxnc Owned by: luxus
Priority: high Milestone:
Component: Core Version: 0.8.3
Severity: major Keywords:
Cc:

Description

GFIRE Version: SVN 251
OS's: Ubuntu 9.04, Linux Mint 7, Sabayon 4.2

IP's are reveresed in a contact's information both on highlighting for info and for joining game.

Change History

follow-up: ↓ 2   Changed 3 years ago by oGGy990

-.- Some ppl said they are reversed, some say they are not...however I have reversed them again on my local file-transfer branch now.

in reply to: ↑ 1   Changed 3 years ago by anonymous

Replying to oGGy990:

-.- Some ppl said they are reversed, some say they are not...however I have reversed them again on my local file-transfer branch now.

Are they all using the svn? Where can I get a hold of your re-re-reversed file(s), or can you tell me basically where I can find the necessary code and I'll edit it myself?

  Changed 3 years ago by oGGy990

In gf_games.c:

gchar *gfire_game_data_ip_str(const gfire_game_data *p_game)
{
	if(!p_game)
		return NULL;

	return g_strdup_printf("%u.%u.%u.%u", p_game->ip.octets[3], p_game->ip.octets[2], p_game->ip.octets[1], p_game->ip.octets[0]);
}

and

void gfire_game_data_ip_from_str(gfire_game_data *p_game, const gchar *p_ipstr)
{
	if(!p_game || !p_ipstr)
		return;

	gchar **ip_octet_strs = g_strsplit(p_ipstr, ".", -1);
	if(!ip_octet_strs)
		return;

	guint8 i = 0;
	for(i = 4; i >= 0; i--)
	{
		if(!ip_octet_strs[4 - i])
		{
			p_game->ip.value = 0;
			g_strfreev(ip_octet_strs);
			return;
		}

		p_game->ip.octets[i] = atoi(ip_octet_strs[4 - i]);
	}

	g_strfreev(ip_octet_strs);
}

  Changed 3 years ago by oGGy990

  • status changed from new to closed
  • resolution set to fixed

Should be fixed as of revision [252].

Note: See TracTickets for help on using tickets.