get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/16968/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16968,
    "url": "https://patches.dpdk.org/api/patches/16968/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1478528522-211060-1-git-send-email-roy.fan.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1478528522-211060-1-git-send-email-roy.fan.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1478528522-211060-1-git-send-email-roy.fan.zhang@intel.com",
    "date": "2016-11-07T14:22:02",
    "name": "[dpdk-dev,v2] examples/ipsec-secgw: fix pointer to local outside scope",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9bbb1dab2308bf1fb0bfb7f1cecd7e1188d5c468",
    "submitter": {
        "id": 304,
        "url": "https://patches.dpdk.org/api/people/304/?format=api",
        "name": "Fan Zhang",
        "email": "roy.fan.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1478528522-211060-1-git-send-email-roy.fan.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/16968/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/16968/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 94E175587;\n\tMon,  7 Nov 2016 15:22:06 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 479B55583\n\tfor <dev@dpdk.org>; Mon,  7 Nov 2016 15:22:05 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga104.jf.intel.com with ESMTP; 07 Nov 2016 06:22:04 -0800",
            "from sie-lab-212-071.ir.intel.com (HELO\n\tsilpixa00381633.ir.intel.com) ([10.237.212.71])\n\tby fmsmga002.fm.intel.com with ESMTP; 07 Nov 2016 06:22:03 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.31,606,1473145200\"; d=\"scan'208\";\n\ta=\"1081734295\"",
        "From": "Fan Zhang <roy.fan.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "sergio.gonzalez.monroy@intel.com",
        "Date": "Mon,  7 Nov 2016 14:22:02 +0000",
        "Message-Id": "<1478528522-211060-1-git-send-email-roy.fan.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1478175163-229116-4-git-send-email-roy.fan.zhang@intel.com>",
        "References": "<1478175163-229116-4-git-send-email-roy.fan.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix pointer to local\n\toutside scope",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Coverity issue: 137871\nFixes: 0d547ed03717 (\"examples/ipsec-secgw: support configuration file\")\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n examples/ipsec-secgw/parser.c | 120 ++++++++++++++++++++----------------------\n 1 file changed, 58 insertions(+), 62 deletions(-)",
    "diff": "diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c\nindex ede08d8..f1afdb7 100644\n--- a/examples/ipsec-secgw/parser.c\n+++ b/examples/ipsec-secgw/parser.c\n@@ -503,86 +503,82 @@ parse_cfg_file(const char *cfg_filename)\n \n \tdo {\n \t\tchar oneline[1024];\n-\n+\t\tchar *pos;\n \t\tget_s = fgets(oneline, 1024, f);\n-\t\tif (get_s) {\n-\t\t\tchar *pos;\n \n-\t\t\tline_num++;\n+\t\tif (!get_s)\n+\t\t\tbreak;\n \n-\t\t\tif (strlen(oneline) > 1022) {\n-\t\t\t\trte_panic(\"%s:%u: error: the line \"\n-\t\t\t\t\t\"contains more characters the \"\n-\t\t\t\t\t\"parser can handle\\n\",\n-\t\t\t\t\tcfg_filename, line_num);\n-\t\t\t\tgoto error_exit;\n-\t\t\t}\n+\t\tline_num++;\n \n-\t\t\t/* process comment char '#' */\n-\t\t\tif (oneline[0] == '#')\n-\t\t\t\tcontinue;\n+\t\tif (strlen(oneline) > 1022) {\n+\t\t\trte_panic(\"%s:%u: error: the line \"\n+\t\t\t\t\"contains more characters the \"\n+\t\t\t\t\"parser can handle\\n\",\n+\t\t\t\tcfg_filename, line_num);\n+\t\t\tgoto error_exit;\n+\t\t}\n \n-\t\t\tpos = strchr(oneline, '#');\n-\t\t\tif (pos != NULL)\n-\t\t\t\t*pos = '\\0';\n-\n-\t\t\t/* process line concatenator '\\' */\n-\t\t\tpos = strchr(oneline, 92);\n-\t\t\tif (pos != NULL) {\n-\t\t\t\tif (pos != oneline+strlen(oneline) - 2) {\n-\t\t\t\t\trte_panic(\"%s:%u: error: no \"\n-\t\t\t\t\t\t\"character should exist \"\n-\t\t\t\t\t\t\"after '\\\\' symbol\\n\",\n-\t\t\t\t\t\tcfg_filename, line_num);\n-\t\t\t\t\tgoto error_exit;\n-\t\t\t\t}\n-\n-\t\t\t\t*pos = '\\0';\n-\n-\t\t\t\tif (strlen(oneline) + strlen(str) > 1022) {\n-\t\t\t\t\trte_panic(\"%s:%u: error: the \"\n-\t\t\t\t\t\t\"concatenated line \"\n-\t\t\t\t\t\t\"contains more characters \"\n-\t\t\t\t\t\t\"the parser can handle\\n\",\n-\t\t\t\t\t\tcfg_filename, line_num);\n-\t\t\t\t\tgoto error_exit;\n-\t\t\t\t}\n-\n-\t\t\t\tstrncpy(str + strlen(str), oneline,\n-\t\t\t\t\tstrlen(oneline));\n+\t\t/* process comment char '#' */\n+\t\tif (oneline[0] == '#')\n+\t\t\tcontinue;\n \n-\t\t\t\tcontinue;\n+\t\tpos = strchr(oneline, '#');\n+\t\tif (pos != NULL)\n+\t\t\t*pos = '\\0';\n+\n+\t\t/* process line concatenator '\\' */\n+\t\tpos = strchr(oneline, 92);\n+\t\tif (pos != NULL) {\n+\t\t\tif (pos != oneline+strlen(oneline) - 2) {\n+\t\t\t\trte_panic(\"%s:%u: error: no character \"\n+\t\t\t\t\t\"should exist after '\\\\'\\n\",\n+\t\t\t\t\tcfg_filename, line_num);\n+\t\t\t\tgoto error_exit;\n \t\t\t}\n \n-\t\t\t/* copy the line to str and process */\n+\t\t\t*pos = '\\0';\n+\n \t\t\tif (strlen(oneline) + strlen(str) > 1022) {\n-\t\t\t\trte_panic(\"%s:%u: error: the line \"\n-\t\t\t\t\t\"contains more characters the \"\n-\t\t\t\t\t\"parser can handle\\n\",\n+\t\t\t\trte_panic(\"%s:%u: error: the \"\n+\t\t\t\t\t\"concatenated line contains more \"\n+\t\t\t\t\t\"characters the parser can \"\n+\t\t\t\t\t\"handle\\n\",\n \t\t\t\t\tcfg_filename, line_num);\n \t\t\t\tgoto error_exit;\n \t\t\t}\n+\n \t\t\tstrncpy(str + strlen(str), oneline,\n \t\t\t\tstrlen(oneline));\n \n-\t\t\tstr[strlen(str)] = '\\n';\n-\t\t\tif (cmdline_parse(cl, str) < 0) {\n-\t\t\t\trte_panic(\"%s:%u: error: parsing \\\"%s\\\" \"\n-\t\t\t\t\t\"failed\\n\", cfg_filename,\n-\t\t\t\t\tline_num, str);\n-\t\t\t\tgoto error_exit;\n-\t\t\t}\n+\t\t\tcontinue;\n+\t\t}\n \n-\t\t\tif (status.status < 0) {\n-\t\t\t\trte_panic(\"%s:%u: error: %s\",\n-\t\t\t\t\tcfg_filename, line_num,\n-\t\t\t\t\tstatus.parse_msg);\n-\t\t\t\tgoto error_exit;\n-\t\t\t}\n+\t\t/* copy the line to str and process */\n+\t\tif (strlen(oneline) + strlen(str) > 1022) {\n+\t\t\trte_panic(\"%s:%u: error: the line contains more \"\n+\t\t\t\t\"characters the parser can handle\\n\",\n+\t\t\t\tcfg_filename, line_num);\n+\t\t\tgoto error_exit;\n+\t\t}\n+\t\tstrncpy(str + strlen(str), oneline,\n+\t\t\tstrlen(oneline));\n+\n+\t\tstr[strlen(str)] = '\\n';\n+\t\tif (cmdline_parse(cl, str) < 0) {\n+\t\t\trte_panic(\"%s:%u: error: parsing \\\"%s\\\" failed\\n\",\n+\t\t\t\tcfg_filename, line_num, str);\n+\t\t\tgoto error_exit;\n+\t\t}\n \n-\t\t\tmemset(str, 0, 1024);\n+\t\tif (status.status < 0) {\n+\t\t\trte_panic(\"%s:%u: error: %s\", cfg_filename,\n+\t\t\t\tline_num, status.parse_msg);\n+\t\t\tgoto error_exit;\n \t\t}\n-\t} while (get_s != NULL);\n+\n+\t\tmemset(str, 0, 1024);\n+\t} while (1);\n \n \tcmdline_stdin_exit(cl);\n \tfclose(f);\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}