Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"en-US,en;q\u003d0.5", "gen_ut":1621287343, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"b7756b26e03d5615295a40082218c9f2", "commit": {"type":"commit", "time": 1602226844, "time_ofs": 60, "oid_tree": { "oid": "0a4a1104b139dfec4095c231f69bc635ee0f2b8f", "alias": []}, "oid":{ "oid": "27964ddaf2463794c46a12fe597533d27639f2f2", "alias": []}, "msg": "ws: reporting PONG with pmd enabled", "sig_commit": { "git_time": { "time": 1602226844, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1602162403, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "ws: reporting PONG with pmd enabled\n\nAdd a return code NOTHING_WE_SHOULD_DO indicating that the\nextension determined by ext-specific means its operation was\ndisabled on this frame.\n\nhttps://github.com/warmcat/libwebsockets/issues/2076\n" , "diff": "diff --git a/lib/core-net/private-lib-core-net.h b/lib/core-net/private-lib-core-net.h\nindex cdbc1ba..044b698 100644\n--- a/lib/core-net/private-lib-core-net.h\n+++ b/lib/core-net/private-lib-core-net.h\n@@ -174,6 +174,7 @@ enum pmd_return {\n \tPMDR_HAS_PENDING,\n \tPMDR_EMPTY_NONFINAL,\n \tPMDR_EMPTY_FINAL,\n+\tPMDR_NOTHING_WE_SHOULD_DO,\n \n \tPMDR_FAILED \u003d -1\n };\ndiff --git a/lib/roles/ws/client-parser-ws.c b/lib/roles/ws/client-parser-ws.c\nindex cacadd2..688e1eb 100644\n--- a/lib/roles/ws/client-parser-ws.c\n+++ b/lib/roles/ws/client-parser-ws.c\n@@ -554,6 +554,7 @@ drain_extension:\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tif (n \u003d\u003d PMDR_DID_NOTHING)\n+\t\t\t\t/* ie, not PMDR_NOTHING_WE_SHOULD_DO */\n \t\t\t\tbreak;\n #endif\n \t\t\tlwsl_ext(\u0022%s: post inflate ebuf in len %d / out len %d\u005cn\u0022,\ndiff --git a/lib/roles/ws/ext/extension-permessage-deflate.c b/lib/roles/ws/ext/extension-permessage-deflate.c\nindex 58fc7fa..de7fc1d 100644\n--- a/lib/roles/ws/ext/extension-permessage-deflate.c\n+++ b/lib/roles/ws/ext/extension-permessage-deflate.c\n@@ -192,10 +192,20 @@ lws_extension_callback_pm_deflate(struct lws_context *context,\n \t\tlwsl_ext(\u0022 %s: LWS_EXT_CB_PAYLOAD_RX: in %d, existing in %d\u005cn\u0022,\n \t\t\t __func__, pmdrx-\u003eeb_in.len, priv-\u003erx.avail_in);\n \n-\t\t/* if this frame is not marked as compressed, we ignore it */\n+\t\t/*\n+\t\t * If this frame is not marked as compressed,\n+\t\t * there is nothing we should do with it\n+\t\t */\n \n \t\tif (!(wsi-\u003ews-\u003ersv_first_msg \u0026 0x40) || (wsi-\u003ews-\u003eopcode \u0026 8))\n-\t\t\treturn PMDR_DID_NOTHING;\n+\t\t\t/*\n+\t\t\t * This is a bit different than DID_NOTHING... we have\n+\t\t\t * identified using ext-private bits in the packet, or\n+\t\t\t * by it being a control fragment that we SHOULD not do\n+\t\t\t * anything to it, parent should continue as if we\n+\t\t\t * processed it\n+\t\t\t */\n+\t\t\treturn PMDR_NOTHING_WE_SHOULD_DO;\n \n \t\t/*\n \t\t * we shouldn't come back in here if we already applied the\ndiff --git a/lib/roles/ws/ops-ws.c b/lib/roles/ws/ops-ws.c\nindex 71fb1c7..de6d098 100644\n--- a/lib/roles/ws/ops-ws.c\n+++ b/lib/roles/ws/ops-ws.c\n@@ -633,6 +633,7 @@ drain_extension:\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tif (n \u003d\u003d PMDR_DID_NOTHING)\n+\t\t\t\t/* ie, not PMDR_NOTHING_WE_SHOULD_DO */\n \t\t\t\tbreak;\n #endif\n \t\t\tlwsl_debug(\u0022%s: post ext ret %d, ebuf in %d / out %d\u005cn\u0022,\n@@ -693,7 +694,8 @@ utf8_fail:\n \n \t\t\tif (n \u003d\u003d PMDR_DID_NOTHING\n #if !defined(LWS_WITHOUT_EXTENSIONS)\n-\t\t\t\t \t||\n+\t\t\t\t\t||\n+\t\t\t n \u003d\u003d PMDR_NOTHING_WE_SHOULD_DO ||\n \t\t\t n \u003d\u003d PMDR_UNKNOWN\n #endif\n \t\t\t )\n","s":{"c":1621287343,"u": 5753}} ],"g": 6106,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}