diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-08-31 00:42:12 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-08-31 00:42:12 +0300 |
commit | 61606835448554a7ee9a4431d732e1f2a9318376 (patch) | |
tree | 171841cea56c4fdbd0fd1bb2473e18d3a96cda3a /src/nxt_main_process.c | |
parent | 3f10b05de995099bf7551b17f5d8d38efe8b4fc5 (diff) | |
download | unit-61606835448554a7ee9a4431d732e1f2a9318376.tar.gz unit-61606835448554a7ee9a4431d732e1f2a9318376.tar.bz2 |
Introduced module compatibility vector.
Diffstat (limited to 'src/nxt_main_process.c')
-rw-r--r-- | src/nxt_main_process.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c index 110867ca..4043d026 100644 --- a/src/nxt_main_process.c +++ b/src/nxt_main_process.c @@ -1026,6 +1026,16 @@ nxt_app_lang_compare(const void *v1, const void *v2) lang1 = v1; lang2 = v2; + if (lang1->type.length != lang2->type.length) { + return lang1->type.length - lang2->type.length; + } + + n = nxt_strncmp(lang1->type.start, lang2->type.start, lang1->type.length); + + if (n != 0) { + return n; + } + length = nxt_min(lang1->version.length, lang2->version.length); n = nxt_strncmp(lang1->version.start, lang2->version.start, length); |