Browse Source
MT#59038 Fix a defect detected by Coverity Scan (websocket)
Fix for:
*** CID 1583599: Code maintainability issues (UNUSED_VALUE)
/daemon/websocket.c: 668 in websocket_http_body()
662 return 0;
663 }
664
665 ilogs(http, LOG_DEBUG, "HTTP body complete: '%.*s'", (int) wm->body->len, wm->body->str);
666
667 if (!strcmp(uri, "/ng") && wm->method == M_POST && wm->content_type == CT_NG)
>>> CID 1583599: Code maintainability issues (UNUSED_VALUE)
>>> Assigning value from "websocket_http_ng" to "handler" here, but that stored value is overwritten before it can be used.
668 handler = websocket_http_ng;
669 if (!strcmp(uri, "/ng-plain") && wm->method == M_POST
670 && (wm->content_type == CT_NG || wm->content_type == CT_JSON))
671 handler = websocket_http_ng_plain;
672 else if (!strcmp(uri, "/admin") && wm->method == M_POST && wm->content_type == CT_JSON)
673 handler = websocket_janus_process;
Change-Id: I08df9fade9cbe3bf8e0f54c9efcc98fd25353c5e
pull/1802/head