while ( response != NULL && prompt( temp, 1024 ) )
{
valerie_util_trim( valerie_util_chomp( temp ) );
- if ( !strcmp( temp, "BYE" ) )
+ if ( !strcasecmp( temp, "BYE" ) )
{
break;
}
{
snprintf( fullname, 1023, "%s%s/%s", cmd_arg->root_dir, dir_name, de[i]->d_name );
if ( lstat( fullname, &info ) == 0 &&
- ( S_ISREG( info.st_mode ) || ( strstr( fullname, ".clip" ) && info.st_mode | S_IXUSR ) ) )
+ ( S_ISREG( info.st_mode ) || S_ISLNK( info.st_mode ) || ( strstr( fullname, ".clip" ) && info.st_mode | S_IXUSR ) ) )
valerie_response_printf( cmd_arg->response, 1024, "\"%s\" %llu\n", de[i]->d_name, (unsigned long long) info.st_size );
free( de[ i ] );
}
char *cr = strchr( command, '\r');
if ( cr != NULL )
cr[0] = '\0';
- if ( eof_chk || strncmp( command, "BYE", 3 ) == 0 )
+ if ( eof_chk || strncasecmp( command, "BYE", 3 ) == 0 )
nchars = 0;
return nchars;
}
while ( response != NULL && prompt( temp, 1024 ) )
{
valerie_util_trim( valerie_util_chomp( temp ) );
- if ( !strcmp( temp, "BYE" ) )
+ if ( !strcasecmp( temp, "BYE" ) )
{
break;
}
{
snprintf( fullname, 1023, "%s%s/%s", cmd_arg->root_dir, dir_name, de[i]->d_name );
if ( lstat( fullname, &info ) == 0 &&
- ( S_ISREG( info.st_mode ) || ( strstr( fullname, ".clip" ) && info.st_mode | S_IXUSR ) ) )
+ ( S_ISREG( info.st_mode ) || S_ISLNK( info.st_mode ) || ( strstr( fullname, ".clip" ) && info.st_mode | S_IXUSR ) ) )
valerie_response_printf( cmd_arg->response, 1024, "\"%s\" %llu\n", de[i]->d_name, (unsigned long long) info.st_size );
free( de[ i ] );
}
char *cr = strchr( command, '\r');
if ( cr != NULL )
cr[0] = '\0';
- if ( eof_chk || strncmp( command, "BYE", 3 ) == 0 )
+ if ( eof_chk || strncasecmp( command, "BYE", 3 ) == 0 )
nchars = 0;
return nchars;
}