libpurple/protocols/mxit/protocol.c

branch
release-2.x.y
changeset 37818
f0287378203f
parent 37663
2953de8b793c
child 37849
8943e2d16d5a
equal deleted inserted replaced
37672:5e5e84e8a798 37818:f0287378203f
1816 profile = g_new0( struct MXitProfile, 1 ); 1816 profile = g_new0( struct MXitProfile, 1 );
1817 } 1817 }
1818 1818
1819 /* set the count for attributes */ 1819 /* set the count for attributes */
1820 count = atoi( records[0]->fields[1]->data ); 1820 count = atoi( records[0]->fields[1]->data );
1821
1822 /* ensure the packet has the correct number of fields */
1823 if ( records[0]->fcount < ( 2 + ( count * 3 ) ) ) {
1824 purple_debug_error( MXIT_PLUGIN_ID, "Insufficient number of fields in extprofile response. fields=%i records=%i", records[0]->fcount, count );
1825 return;
1826 }
1821 1827
1822 for ( i = 0; i < count; i++ ) { 1828 for ( i = 0; i < count; i++ ) {
1823 char* fname; 1829 char* fname;
1824 char* fvalue; 1830 char* fvalue;
1825 char* fstatus; 1831 char* fstatus;

mercurial