Indentation and style fixes.
This commit is contained in:
parent
164954a788
commit
be97fa8ab1
@ -921,22 +921,22 @@ va_dcl
|
|||||||
GLOBAL char*
|
GLOBAL char*
|
||||||
Conn_Password( CONN_ID Idx )
|
Conn_Password( CONN_ID Idx )
|
||||||
{
|
{
|
||||||
assert( Idx > NONE );
|
assert( Idx > NONE );
|
||||||
if (My_Connections[Idx].pwd == NULL)
|
if (My_Connections[Idx].pwd == NULL)
|
||||||
return (char*)"\0";
|
return (char*)"\0";
|
||||||
else
|
else
|
||||||
return My_Connections[Idx].pwd;
|
return My_Connections[Idx].pwd;
|
||||||
} /* Conn_Password */
|
} /* Conn_Password */
|
||||||
|
|
||||||
GLOBAL void
|
GLOBAL void
|
||||||
Conn_SetPassword( CONN_ID Idx, const char *Pwd )
|
Conn_SetPassword( CONN_ID Idx, const char *Pwd )
|
||||||
{
|
{
|
||||||
assert( Idx > NONE );
|
assert( Idx > NONE );
|
||||||
My_Connections[Idx].pwd = strdup(Pwd);
|
My_Connections[Idx].pwd = strdup(Pwd);
|
||||||
if (My_Connections[Idx].pwd == NULL) {
|
if (My_Connections[Idx].pwd == NULL) {
|
||||||
Log(LOG_EMERG, "Can't allocate memory! [Conn_SetPassword]");
|
Log(LOG_EMERG, "Can't allocate memory! [Conn_SetPassword]");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
} /* Conn_SetPassword */
|
} /* Conn_SetPassword */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1167,7 +1167,7 @@ Conn_Close( CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClie
|
|||||||
array_free(&My_Connections[Idx].rbuf);
|
array_free(&My_Connections[Idx].rbuf);
|
||||||
array_free(&My_Connections[Idx].wbuf);
|
array_free(&My_Connections[Idx].wbuf);
|
||||||
if (My_Connections[Idx].pwd != NULL)
|
if (My_Connections[Idx].pwd != NULL)
|
||||||
free(My_Connections[Idx].pwd);
|
free(My_Connections[Idx].pwd);
|
||||||
|
|
||||||
/* Clean up connection structure (=free it) */
|
/* Clean up connection structure (=free it) */
|
||||||
Init_Conn_Struct( Idx );
|
Init_Conn_Struct( Idx );
|
||||||
|
@ -80,7 +80,8 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
|
|||||||
Conn_Close( Client_Conn( Client ), NULL, "Server not configured here", true);
|
Conn_Close( Client_Conn( Client ), NULL, "Server not configured here", true);
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
}
|
}
|
||||||
if( strcmp( Conn_Password( Client_Conn( Client ) ), Conf_Server[i].pwd_in ) != 0 )
|
if( strcmp( Conn_Password( Client_Conn( Client ) ),
|
||||||
|
Conf_Server[i].pwd_in ) != 0 )
|
||||||
{
|
{
|
||||||
/* wrong password */
|
/* wrong password */
|
||||||
Log( LOG_ERR, "Connection %d: Got bad password from server \"%s\"!", Client_Conn( Client ), Req->argv[0] );
|
Log( LOG_ERR, "Connection %d: Got bad password from server \"%s\"!", Client_Conn( Client ), Req->argv[0] );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user