mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
fix print_cookies to use iterator
This commit is contained in:
parent
c4d212f78c
commit
f944b154fc
1 changed files with 12 additions and 2 deletions
|
@ -202,8 +202,18 @@ cmd_shutdown( int socket, const char** args )
|
|||
static void
|
||||
print_cookies( int socket, const char* name )
|
||||
{
|
||||
CookieID id = CRefMgr::Get()->CookieIdForName( name );
|
||||
print_cookies( socket, id );
|
||||
CookieMapIterator iter = CRefMgr::Get()->GetCookieIterator();
|
||||
CookieID id;
|
||||
|
||||
for ( id = iter.Next(); id != 0; id = iter.Next() ) {
|
||||
SafeCref scr( id );
|
||||
if ( scr.IsValid() && scr.Name() == name ) {
|
||||
string s;
|
||||
scr.PrintCookieInfo( s );
|
||||
|
||||
print_to_sock( socket, s.c_str() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue