Commit b115bea4 authored by 's avatar
Browse files

Add 'agent' component for DiMAPI

git-svn-id: file:///home/svn/mapi/trunk@266 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 6e2082b9
......@@ -226,6 +226,11 @@ void *handle_request(void *arg) {
memcpy(dbuf->data, result, sizeof(int));
dbuf->length = BASIC_SIZE + sizeof(int);
}
else if(!strcmp(funct_info.name,"TOP")){
memcpy(dbuf->data, result, 2*sizeof(unsigned int)*100+4);
dbuf->length = BASIC_SIZE + 2*sizeof(unsigned int)*100+4;
}
//to be continued...
}
else{
......@@ -384,6 +389,18 @@ int getfid(struct dmapiipcbuf *dbuf){
result = mapi_apply_function(dbuf->fd, function, data);
return(result);
}
else if(!strcmp(function,"TOP")){//Checked
int arg1, arg2, arg3;
p=data;
memcpy(&arg1,p,sizeof(int));
p+=sizeof(int);
memcpy(&arg2,p,sizeof(int));
p+=sizeof(int);
memcpy(&arg3,p,sizeof(int));
fprintf(stdout,"%s, %d %d %d\n",function, arg1, arg2, arg3);
result = mapi_apply_function(dbuf->fd, function, arg1, arg2, arg3);
return(result);
}
else if(!strcmp(function,"TRACK_FTP")){//Checked
fprintf(stdout,"TRACK_FTP\n");
result = mapi_apply_function(dbuf->fd, function);
......
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