libpurple/protocols/mxit/actions.c

changeset 36068
e9b9320a985a
parent 35679
0c337fe8f655
child 37148
50f361d39a1e
equal deleted inserted replaced
36067:df9f5de00ea2 36068:e9b9320a985a
51 const char* err = NULL; 51 const char* err = NULL;
52 GList* entry = NULL; 52 GList* entry = NULL;
53 53
54 purple_debug_info( MXIT_PLUGIN_ID, "mxit_profile_cb\n" ); 54 purple_debug_info( MXIT_PLUGIN_ID, "mxit_profile_cb\n" );
55 55
56 if ( !PURPLE_CONNECTION_IS_VALID( gc ) ) { 56 PURPLE_ASSERT_CONNECTION_IS_VALID(gc);
57 purple_debug_error( MXIT_PLUGIN_ID, "Unable to update profile; account offline.\n" );
58 return;
59 }
60 57
61 /* validate name */ 58 /* validate name */
62 name = purple_request_fields_get_string( fields, "name" ); 59 name = purple_request_fields_get_string( fields, "name" );
63 if ( ( !name ) || ( strlen( name ) < 3 ) ) { 60 if ( ( !name ) || ( strlen( name ) < 3 ) ) {
64 err = _( "The Display Name you entered is invalid." ); 61 err = _( "The Display Name you entered is invalid." );
328 const char* pin2 = NULL; 325 const char* pin2 = NULL;
329 const char* err = NULL; 326 const char* err = NULL;
330 int len; 327 int len;
331 int i; 328 int i;
332 329
333 if ( !PURPLE_CONNECTION_IS_VALID( gc ) ) { 330 PURPLE_ASSERT_CONNECTION_IS_VALID(gc);
334 purple_debug_error( MXIT_PLUGIN_ID, "Unable to update PIN; account offline.\n" );
335 return;
336 }
337 331
338 /* validate pin */ 332 /* validate pin */
339 pin = purple_request_fields_get_string( fields, "pin" ); 333 pin = purple_request_fields_get_string( fields, "pin" );
340 if ( !pin ) { 334 if ( !pin ) {
341 err = _( "The PIN you entered is invalid." ); 335 err = _( "The PIN you entered is invalid." );

mercurial