pidgin/android/libpurple2

MXit: Replace strtoll() with g_ascii_strtoll().
release-2.x.y
2013-04-01, Andrew Victor
19081badb425
Parents 7e3903a32a1b
Children 5d6efef74ff8
MXit: Replace strtoll() with g_ascii_strtoll().
Also handle the profile flags as a 64-bit value.
--- a/libpurple/protocols/mxit/actions.c Mon Apr 01 10:44:37 2013 +0200
+++ b/libpurple/protocols/mxit/actions.c Mon Apr 01 11:18:23 2013 +0200
@@ -186,7 +186,7 @@
profile->flags &= ~CP_PROF_NOT_SUGGESTABLE;
else
profile->flags |= CP_PROF_NOT_SUGGESTABLE;
- g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%i", CP_PROFILE_FLAGS, CP_PROFILE_TYPE_LONG, profile->flags);
+ g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%" G_GINT64_FORMAT, CP_PROFILE_FLAGS, CP_PROFILE_TYPE_LONG, profile->flags);
g_string_append( attributes, attrib );
acount++;
--- a/libpurple/protocols/mxit/profile.h Mon Apr 01 10:44:37 2013 +0200
+++ b/libpurple/protocols/mxit/profile.h Mon Apr 01 11:18:23 2013 +0200
@@ -61,7 +61,7 @@
char aboutme[513]; /* about me */
int relationship; /* relationship status */
- int flags; /* user's profile flags */
+ gint64 flags; /* user's profile flags */
gint64 lastonline; /* user's last-online timestamp */
};
--- a/libpurple/protocols/mxit/protocol.c Mon Apr 01 10:44:37 2013 +0200
+++ b/libpurple/protocols/mxit/protocol.c Mon Apr 01 11:18:23 2013 +0200
@@ -1879,11 +1879,11 @@
}
else if ( strcmp( CP_PROFILE_FLAGS, fname ) == 0 ) {
/* profile flags */
- profile->flags = strtoll( fvalue, NULL, 10 );
+ profile->flags = g_ascii_strtoll( fvalue, NULL, 10 );
}
else if ( strcmp( CP_PROFILE_LASTSEEN, fname ) == 0 ) {
/* last seen online */
- profile->lastonline = strtoll( fvalue, NULL, 10 );
+ profile->lastonline = g_ascii_strtoll( fvalue, NULL, 10 );
}
else if ( strcmp( CP_PROFILE_WHEREAMI, fname ) == 0 ) {
/* where am I */