Mercurial > noffle
comparison src/client.c @ 172:0ce333d046b9 noffle
[svn] Fix bug. Server name was not yet initialized
if server required authentication at connect time.
author | enz |
---|---|
date | Tue, 13 Mar 2001 11:46:03 +0000 |
parents | 94f2e5607772 |
children | 09ca6eb5c7ff |
comparison
equal
deleted
inserted
replaced
171:27ef8eaa254d | 172:0ce333d046b9 |
---|---|
1 /* | 1 /* |
2 client.c | 2 client.c |
3 | 3 |
4 $Id: client.c 248 2001-01-25 11:00:03Z bears $ | 4 $Id: client.c 269 2001-03-13 11:46:03Z enz $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
342 fclose( client.out ); | 342 fclose( client.out ); |
343 close( sock ); | 343 close( sock ); |
344 client.in = client.out = NULL; | 344 client.in = client.out = NULL; |
345 break; | 345 break; |
346 } | 346 } |
347 Utl_cpyStr( client.serv, serv ); | |
347 stat = getStat(); | 348 stat = getStat(); |
348 if ( stat == STAT_READY_POST_ALLOW || | 349 if ( stat == STAT_READY_POST_ALLOW || |
349 stat == STAT_READY_NO_POST_ALLOW ) | 350 stat == STAT_READY_NO_POST_ALLOW ) |
350 { | 351 { |
351 /* INN needs a MODE READER before it will permit POST. */ | 352 /* INN needs a MODE READER before it will permit POST. */ |
355 switch( stat ) { | 356 switch( stat ) { |
356 case STAT_READY_POST_ALLOW: | 357 case STAT_READY_POST_ALLOW: |
357 case STAT_READY_NO_POST_ALLOW: | 358 case STAT_READY_NO_POST_ALLOW: |
358 Log_inf( "Connected to %s:%d", | 359 Log_inf( "Connected to %s:%d", |
359 inet_ntoa( sIn.sin_addr ), port ); | 360 inet_ntoa( sIn.sin_addr ), port ); |
360 Utl_cpyStr( client.serv, serv ); | |
361 return TRUE; | 361 return TRUE; |
362 default: | 362 default: |
363 Log_err( "Bad server stat %d", stat ); | 363 Log_err( "Bad server stat %d", stat ); |
364 } | 364 } |
365 shutdown( fileno( client.out ), 0 ); | 365 shutdown( fileno( client.out ), 0 ); |