Commit 3b01a40e authored by 's avatar

fix for mapi_close_flow in dimapi

git-svn-id: file:///home/svn/mapi/trunk@300 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 3f607e4f
......@@ -165,12 +165,13 @@ void *handle_request(void *arg) {
active_flows = realloc(active_flows,ac_fl_size*sizeof(int));
}
}
dbuf->cmd = CLOSE_FLOW_ACK;
//dbuf->cmd = CLOSE_FLOW_ACK;
}
else{
dbuf->cmd = ERROR_ACK;
}
dbuf->length = BASIC_SIZE;
//else{
// dbuf->cmd = ERROR_ACK;
//}
//dbuf->length = BASIC_SIZE;
//no need to send responce
break;
case CONNECT:
fprintf(stdout,"CONNECT (%d)",dbuf->fd);
......@@ -318,12 +319,15 @@ void *handle_request(void *arg) {
die("Default case found in handle_request loop!\n");
break;
}
if(dbuf->cmd==CLOSE_FLOW){
/*if(dbuf->cmd==CLOSE_FLOW){
fprintf(stdout,"AGENT BREAKING\n");//XXX if only one flow exists
break;//XXX it should only break if it is the last flow (we don't have that info)
}
//break;//XXX it should only break if it is the last flow (we don't have that info)
}*/
send(sock, dbuf, dbuf->length, 0);
//no need to send responce on mapi_close_flow
if (dbuf->cmd!=CLOSE_FLOW) {
send(sock, dbuf, dbuf->length, 0);
}
dbuf_bytes=dbuf_bytes-((struct dmapiipcbuf *)buffer)->length;
memcpy(buffer,buffer+((struct dmapiipcbuf *)buffer)->length,dbuf_bytes);
......
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