[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More warning fixes #885

Merged
merged 17 commits into from
Feb 16, 2019
Merged

More warning fixes #885

merged 17 commits into from
Feb 16, 2019

Conversation

Bond-009
Copy link
Member

No description provided.

Copy link
Member
@EraYaN EraYaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some minor notes/questions.

@@ -101,7 +118,7 @@ private static async Task StartApp(StartupOptions options)
SQLitePCL.Batteries_V2.Init();

// Allow all https requests
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; } );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On an unrelated note, this should be configurable. I believe this is for out going connections, and it's not very good practice to have it as default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But probably also out of scope. It might warrant a //TODO

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is a bad practice, should be off by default.
Definitely warrants a TODO at least.

Jellyfin.Server/SocketSharp/RequestMono.cs Show resolved Hide resolved
jellyfin.ruleset Show resolved Hide resolved
Copy link
Contributor
@JustAMan JustAMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor suggestions.

Jellyfin.Server/Jellyfin.Server.csproj Outdated Show resolved Hide resolved
}

long virt = real - offset;
if (virt < 0 || virt > Length)
{
throw new ArgumentException();
throw new ArgumentException("Invalid position", nameof(origin));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think bad position should be tied to d, not origin here:

Suggested change
throw new ArgumentException("Invalid position", nameof(origin));
throw new ArgumentException("Invalid position", nameof(d));

public long Start;
public long Length;
public string ContentType { get; set; }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need empty lines between those? you didn't use them in other files here

}
}

long start = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
long start = 0;
long start = data.Position;

Jellyfin.Server/SocketSharp/SharpWebSocket.cs Show resolved Hide resolved
@@ -107,6 +110,7 @@ internal static string CheckBadChars(string name)
switch (crlf)
{
case 0:
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add braces here? they seem to be excessive for me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure the the analyzer wanted it.

@JustAMan JustAMan merged commit b7ae044 into jellyfin:master Feb 16, 2019
@Bond-009 Bond-009 deleted the warn branch July 24, 2019 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants