Changeset c9f0c79
- Timestamp:
- 2006-06-26T12:04:21Z (18 years ago)
- Branches:
- master
- Children:
- 471573f
- Parents:
- fd03770
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage_xml.c
rfd03770 rc9f0c79 34 34 XML_PASS_CHECK_ONLY = -1, 35 35 XML_PASS_UNKNOWN = 0, 36 XML_PASS_WRONG, 36 37 XML_PASS_OK 37 38 } xml_pass_st; 38 39 39 /* This isn't very clean, probably making a separate error class + code for 40 BitlBee would be a better solution. But this will work for now... */ 41 #define XML_PASS_ERRORMSG "Wrong username or password" 40 /* To make it easier later when extending the format: */ 42 41 #define XML_FORMAT_VERSION 1 43 42 … … 108 107 if( pass_dec[i] != pass_md5[i] ) 109 108 { 109 xd->pass_st = XML_PASS_WRONG; 110 110 g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, 111 XML_PASS_ERRORMSG);111 "Password mismatch" ); 112 112 break; 113 113 } … … 302 302 if( !g_markup_parse_context_parse( ctx, buf, st, &gerr ) || gerr ) 303 303 { 304 xml_pass_st pass_st = xd->pass_st; 305 304 306 g_markup_parse_context_free( ctx ); 305 307 close( fd ); 306 308 307 /* Slightly dirty... */ 308 if( gerr && strcmp( gerr->message, XML_PASS_ERRORMSG ) == 0 ) 309 if( pass_st == XML_PASS_WRONG ) 309 310 { 310 311 g_clear_error( &gerr ); … … 332 333 irc->status |= USTATUS_IDENTIFIED; 333 334 335 /* TODO: This really shouldn't be here, I think... */ 334 336 if( set_getint( irc, "auto_connect" ) ) 335 337 {
Note: See TracChangeset
for help on using the changeset viewer.