Commit c8a18a05 authored by 's avatar

Be backward compatible if pre/post rev. 1442 client/server communicate...

Be backward compatible if pre/post rev. 1442 client/server communicate (devtype "1.3" is forced in such case).


git-svn-id: file:///home/svn/mapi/trunk@1444 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 90d7ac0b
......@@ -749,7 +749,10 @@ int mapi_create_flow(const char *dev)
hflow=(host_flow*)fnode->data;
if (hflow->dbuf->cmd == CREATE_FLOW_ACK) {
hflow->fd=*((int*)hflow->dbuf->data);
hflow->devtype = strdup((char *)(((char *)hflow->dbuf->data) + sizeof(int)));
if(hflow->dbuf->length - BASIC_SIZE > sizeof(int))
hflow->devtype = strndup((char *)(((char *)hflow->dbuf->data) + sizeof(int)), hflow->dbuf->length - BASIC_SIZE - 1);
else
hflow->devtype = strdup("1.3");
flist_remove(hflow->rhost->flows, hflow->dbuf->fd);
flist_append(hflow->rhost->flows, hflow->fd, hflow);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment