Changes in storage_xml.c [15d1469:88d2208]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage_xml.c
r15d1469 r88d2208 29 29 #include "arc.h" 30 30 #include "md5.h" 31 #include <glib/gstdio.h> 31 32 32 33 #if GLIB_CHECK_VERSION(2,8,0) … … 258 259 } 259 260 260 static storage_status_t xml_load_real( irc_t *irc, const char *my_nick, const char *password, xml_pass_st action )261 static storage_status_t xml_load_real( const char *my_nick, const char *password, irc_t *irc, xml_pass_st action ) 261 262 { 262 263 GMarkupParseContext *ctx; … … 265 266 GError *gerr = NULL; 266 267 int fd, st; 268 269 if( irc && irc->status & USTATUS_IDENTIFIED ) 270 return( 1 ); 267 271 268 272 xd = g_new0( struct xml_parsedata, 1 ); … … 317 321 return STORAGE_OK; 318 322 323 irc->status |= USTATUS_IDENTIFIED; 324 319 325 return STORAGE_OK; 320 326 } 321 327 322 static storage_status_t xml_load( irc_t *irc, const char *password)323 { 324 return xml_load_real( irc, irc->nick, password, XML_PASS_UNKNOWN );328 static storage_status_t xml_load( const char *my_nick, const char *password, irc_t *irc ) 329 { 330 return xml_load_real( my_nick, password, irc, XML_PASS_UNKNOWN ); 325 331 } 326 332 … … 329 335 /* This is a little bit risky because we have to pass NULL for the 330 336 irc_t argument. This *should* be fine, if I didn't miss anything... */ 331 return xml_load_real( NULL, my_nick, password, XML_PASS_CHECK_ONLY );337 return xml_load_real( my_nick, password, NULL, XML_PASS_CHECK_ONLY ); 332 338 } 333 339 … … 364 370 md5_byte_t pass_md5[21]; 365 371 md5_state_t md5_state; 372 373 if( irc->password == NULL ) 374 { 375 irc_usermsg( irc, "Please register yourself if you want to save your settings." ); 376 return STORAGE_OTHER_ERROR; 377 } 366 378 367 379 path2 = g_strdup( irc->nick );
Note: See TracChangeset
for help on using the changeset viewer.