/pidgin/main: 19081badb425: MXit: Replace strtoll() with g_ascii...
Andrew Victor
andrew.victor at mxit.com
Mon Apr 1 06:33:50 EDT 2013
Changeset: 19081badb4252a52ca3b23ae77f1c0c78703fd3f
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2013-04-01 11:18 +0200
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/19081badb425
Description:
MXit: Replace strtoll() with g_ascii_strtoll().
Also handle the profile flags as a 64-bit value.
diffstat:
libpurple/protocols/mxit/actions.c | 2 +-
libpurple/protocols/mxit/profile.h | 2 +-
libpurple/protocols/mxit/protocol.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diffs (41 lines):
diff --git a/libpurple/protocols/mxit/actions.c b/libpurple/protocols/mxit/actions.c
--- a/libpurple/protocols/mxit/actions.c
+++ b/libpurple/protocols/mxit/actions.c
@@ -186,7 +186,7 @@ out:
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++;
diff --git a/libpurple/protocols/mxit/profile.h b/libpurple/protocols/mxit/profile.h
--- a/libpurple/protocols/mxit/profile.h
+++ b/libpurple/protocols/mxit/profile.h
@@ -61,7 +61,7 @@ struct MXitProfile {
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 */
};
diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -1879,11 +1879,11 @@ static void mxit_parse_cmd_extprofile( s
}
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 */
More information about the Commits
mailing list