-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Record codec GUID to identify unknown codec #2401
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @metalefty. Looks like a worthwhile addition. There's some duplication with an existing function which I've mentioned in my comments.
@@ -521,6 +522,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) | |||
int i1; | |||
char *codec_guid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May need const struct guid *codec_guid
instead if we use the function in guid.c. Also the cast will need to be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do this later in this PR. Can you have a look again at other points?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me now.
I've read the link you've provided, and I don't think there's any difference between Microsoft's interpretation of a GUID and RFC4122. In other words, I think you can just call get rid of the existing guid_to_str()
and replace it with your new function completely. The existing uses of the function should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it fine to add hyphens for other use cases of guid_to_str()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing uses of the function should be fine.
Ah, you've already mentioned that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matt335672 I've replaced your guid_to_str()
with my ms_guid_to_str()
. Can you have a look again?
Hi @metalefty. I've done some more thinking about this. There may be some mileage in updating guid.c to generate proper UUIDs as specified by RFC4122 section 4.4. I can look at that as a subsequent PR after this one is merged. |
Moved some functions and tests to Microsoft's GUID is a little bit different from the common UUID. So I created a separate function |
ccd94fc
to
c32f6f4
Compare
Sorry for the noise of frequent force-pushes. I forgot to remove some unused things in string_calls.
Indeed. Current GUID generation is actually not compliant with the spec. |
One comment added above. Also you're right - I need to fix the GUID generation. |
@@ -521,6 +522,10 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) | |||
int i1; | |||
char *codec_guid; | |||
char *next_guid; | |||
struct guid guid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure char *next_guid
can be replaced with struct guid
so just kept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks fine to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, with the noted change to the function header comment
@@ -521,6 +522,10 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len) | |||
int i1; | |||
char *codec_guid; | |||
char *next_guid; | |||
struct guid guid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks fine to me
Related to #2400, I was always wondering what is the unknown codec which has codec id 5 that appears in the log very often.
I added codec GUID to the log in order to identify unknown codecs. It turned out the one is Image RemoteFX.
@matt335672 I'd appreciate it if you review the
g_guid_to_string
function. It is the only void function in string_calls. Should it return some value?