Diff for /libaitrpc/src/srv.c between versions 1.5.2.1 and 1.5.2.2

version 1.5.2.1, 2011/09/07 08:56:32 version 1.5.2.2, 2011/09/07 09:10:55
Line 111  rpc_srv_dispatchCall(void *arg) Line 111  rpc_srv_dispatchCall(void *arg)
                         Limit = sizeof(struct tagRPCCall);                          Limit = sizeof(struct tagRPCCall);
   
                 /* RPC is OK! Go decapsulate variables ... */                  /* RPC is OK! Go decapsulate variables ... */
                if (rpc->call_argc) {                if (ntohs(rpc->call_argc)) {
                        arr = io_buffer2vals(buf + Limit, s->srv_netbuf - Limit, rpc->call_argc, 1);                        arr = io_buffer2vals(buf + Limit, s->srv_netbuf - Limit, 
                                         ntohs(rpc->call_argc), 1);
                         if (!arr) {                          if (!arr) {
                                 ret = -5;                                  ret = -5;
                                 goto makeReply;                                  goto makeReply;
Line 123  rpc_srv_dispatchCall(void *arg) Line 124  rpc_srv_dispatchCall(void *arg)
                 /* execute call */                  /* execute call */
                 argc = 0;                  argc = 0;
                 memcpy(&ses, &rpc->call_session, sizeof ses);                  memcpy(&ses, &rpc->call_session, sizeof ses);
                if (!(f = rpc_srv_getCall(s, rpc->call_tag, rpc->call_hash))) {                if (!(f = rpc_srv_getCall(s, ntohs(rpc->call_tag), ntohl(rpc->call_hash)))) {
                         rpc_SetErr(EPROGUNAVAIL, "Error:: call not found into RPC server ...\n");                          rpc_SetErr(EPROGUNAVAIL, "Error:: call not found into RPC server ...\n");
                         ret = -6;                          ret = -6;
                 } else                  } else
Line 148  makeReply: Line 149  makeReply:
                 memcpy(&rrpc->ret_session, &ses, sizeof(rpc_sess_t));                  memcpy(&rrpc->ret_session, &ses, sizeof(rpc_sess_t));
                 rrpc->ret_tag = rpc->call_tag;                  rrpc->ret_tag = rpc->call_tag;
                 rrpc->ret_hash = rpc->call_hash;                  rrpc->ret_hash = rpc->call_hash;
                rrpc->ret_errno = rpc_Errno;                rrpc->ret_errno = htonl(rpc_Errno);
                rrpc->ret_retcode = ret;                rrpc->ret_retcode = htonl(ret);
                rrpc->ret_argc = argc;                rrpc->ret_argc = htons(argc);
   
                 if (argc && arr) {                  if (argc && arr) {
                         /* Go Encapsulate variables ... */                          /* Go Encapsulate variables ... */
Line 827  rpc_srv_execCall(rpc_func_t * __restrict call, struct  Line 828  rpc_srv_execCall(rpc_func_t * __restrict call, struct 
   
         func = dlsym(dl, (char*) call->func_name);          func = dlsym(dl, (char*) call->func_name);
         if (func)          if (func)
                ret = func(call, rpc->call_argc, args);                ret = func(call, ntohs(rpc->call_argc), args);
         else {          else {
                 rpc_SetErr(ENOEXEC, "Error:: Can`t find function %s!\n", dlerror());                  rpc_SetErr(ENOEXEC, "Error:: Can`t find function %s!\n", dlerror());
                 ret = -1;                  ret = -1;

Removed from v.1.5.2.1  
changed lines
  Added in v.1.5.2.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>