Commit 16e4e3ba 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) fix.


git-svn-id: file:///home/svn/mapi/trunk@1445 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent c8a18a05
......@@ -750,9 +750,9 @@ int mapi_create_flow(const char *dev)
if (hflow->dbuf->cmd == CREATE_FLOW_ACK) {
hflow->fd=*((int*)hflow->dbuf->data);
if(hflow->dbuf->length - BASIC_SIZE > sizeof(int))
hflow->devtype = strndup((char *)(((char *)hflow->dbuf->data) + sizeof(int)), hflow->dbuf->length - BASIC_SIZE - 1);
hflow->devtype = strndup((char *)(((char *)hflow->dbuf->data) + sizeof(int)), hflow->dbuf->length - BASIC_SIZE - sizeof(int) - 1);
else
hflow->devtype = strdup("1.3");
hflow->devtype = strndup("1.3", 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