Index: /devel/5.X/log.h
===================================================================
--- /devel/5.X/log.h	(revision 326)
+++ /devel/5.X/log.h	(revision 327)
@@ -151,5 +151,5 @@
 typedef enum getter_setter SGetter;
 
-// HVB extern int LOGLEVEL;
+// HvB extern int LOGLEVEL;
 
 extern long *log_event_mask;
Index: /devel/5.X/pbs.i
===================================================================
--- /devel/5.X/pbs.i	(revision 326)
+++ /devel/5.X/pbs.i	(revision 327)
@@ -417,5 +417,9 @@
     and fill in the next fields so it also works for the C-library
   */
-  printf("basje \n");
+
+  if (SARA_DEBUG)
+  {
+     printf("new_attrl \n");
+  }
   ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
 
Index: /devel/5.X/pbs.py
===================================================================
--- /devel/5.X/pbs.py	(revision 326)
+++ /devel/5.X/pbs.py	(revision 327)
@@ -929,7 +929,16 @@
   Get the default values from the mom daemon
   """
+  err = 0
+  print default_mom_res
   for res in default_mom_res:
-    addreq(id, res)
-    resp = getreq(id)
+    print res
+    #addreq(id, res)
+    addreq_err(id, err, res) 
+    print err
+    #resp = getreq(id)
+    resp = getreq_err(err, id)
+    print "error: ", err
+
+    print resp,id
     check_resp(d, resp)
 
Index: /devel/5.X/pbs_node_info
===================================================================
--- /devel/5.X/pbs_node_info	(revision 326)
+++ /devel/5.X/pbs_node_info	(revision 327)
@@ -19,15 +19,43 @@
     attrs = node.attribs
     for attr in attrs:
-      print '\t', attr.name, ' = ', attr.value
+      print '\t  ', attr.name, ' = ', attr.value
 
-    try:
-      mom_port = socket.getservbyname('pbs_resmom', 'tcp')
-      mom_id = pbs.openrm(node.name, mom_port)
-    except socket.error, detail:
-      mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT)
+#    try:
+#      mom_port = socket.getservbyname('pbs_resmom', 'tcp')
+#      mom_id = pbs.openrm(node.name, mom_port)
+#    except socket.error, detail:
+#      mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT)
+
+    err = 0
+    mom_id = pbs.openrm(node.name, pbs.PBS_MANAGER_SERVICE_PORT)
+    e, e_txt = pbs.error()
+    print "openrm", e, e_txt
+    print node.name, mom_id, pbs.PBS_MANAGER_SERVICE_PORT
+    pbs.flushreq()
+    #pbs.fullresp(1)
+    e, e_txt = pbs.error()
+    print "flush", e, e_txt
+
+    #pbs.addreq_err(mom_id, err, "arch")
+    pbs.addreq(mom_id, "arch")
+    e, e_txt = pbs.error()
+    print "addreq:", e, e_txt
+
+    print pbs.activereq()
+    e, e_txt = pbs.error()
+    print "addreq:", e, e_txt
+
+    #resp = pbs.getreq_err(err, mom_id)
+    resp = pbs.getreq(mom_id)
+    e, e_txt = pbs.error()
+    print e, e_txt
+    print err, resp
+
+    sys.exit(1)
+    print 'rm interface'
 
     mom_keys = pbs.get_mom_values(mom_id)
     for key in mom_keys.keys():
-      print '\t %s = %s' %(key, mom_keys[key])
+      print '\t mom %s = %s' %(key, mom_keys[key])
 
     print 'Testing list with user supplied keywords'
Index: /devel/5.X/pbs_wrap.c
===================================================================
--- /devel/5.X/pbs_wrap.c	(revision 326)
+++ /devel/5.X/pbs_wrap.c	(revision 327)
@@ -3014,5 +3014,9 @@
     and fill in the next fields so it also works for the C-library
   */
-  printf("basje \n");
+
+  if (SARA_DEBUG)
+  {
+     printf("new_attrl \n");
+  }
   ptr = (struct attrl *) malloc(number * sizeof(struct attrl));
 
@@ -3021,5 +3025,5 @@
   for (i=0; i < number; i++)
   { 
-    printf("constructor called\n");
+    // printf("constructor called\n");
     current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
     current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
@@ -3058,5 +3062,5 @@
   for (i=0; i < number; i++)
   { 
-    printf("constructor called\n");
+    // printf("constructor called\n");
     current->name     = (char *) malloc(MAXNAMLEN * sizeof(char));
     current->resource = (char *) malloc(MAXNAMLEN * sizeof(char));
@@ -5550,6 +5554,4 @@
   char *buf4 = 0 ;
   int alloc4 = 0 ;
-  void *argp5 = 0 ;
-  int res5 = 0 ;
   int res6 ;
   char *buf6 = 0 ;
@@ -5584,9 +5586,54 @@
   }
   arg4 = (char *)(buf4);
-  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_attropl, 0 |  0 );
-  if (!SWIG_IsOK(res5)) {
-    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pbs_manager" "', argument " "5"" of type '" "struct attropl *""'"); 
-  }
-  arg5 = (struct attropl *)(argp5);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj4);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg5 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj4, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg5 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
   res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
   if (!SWIG_IsOK(res6)) {
@@ -6309,14 +6356,59 @@
   PyObject *resultobj = 0;
   struct batch_status *arg1 = (struct batch_status *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
   PyObject * obj0 = 0 ;
   
   if (!PyArg_ParseTuple(args,(char *)"O:pbs_statfree",&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_batch_status, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pbs_statfree" "', argument " "1"" of type '" "struct batch_status *""'"); 
-  }
-  arg1 = (struct batch_status *)(argp1);
+  {
+    PyObject              *py_obj;
+    struct batch_status   *ptr, *prev;
+    char                  s[255];
+    int                   i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct batch_status *):\n");
+    
+    size = Get_List_Size(obj0);
+    if (SARA_DEBUG) printf("\tSize of batch_status list: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    // printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg1 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj0, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_batch_status, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg1 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      
+      if (SARA_DEBUG) printf("\t\t- %s\n", ptr->name);
+      prev = ptr;
+      
+    } // end for
+    
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
   pbs_statfree(arg1);
   resultobj = SWIG_Py_Void();
@@ -6929,6 +7021,4 @@
   int val1 ;
   int ecode1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
   int res3 ;
   char *buf3 = 0 ;
@@ -6953,9 +7043,54 @@
   } 
   arg1 = (int)(val1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_attropl, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pbs_submit" "', argument " "2"" of type '" "struct attropl *""'"); 
-  }
-  arg2 = (struct attropl *)(argp2);
+  {
+    PyObject          *py_obj;
+    struct attropl    *ptr, *prev;
+    char              s[255];
+    int               i=0, size=0;
+    
+    // printf("Python --> C\n");
+    
+    if (SARA_DEBUG) printf("Converteren python -> c (struct attropl *):\n");
+    
+    size = Get_List_Size(obj1);
+    
+    if (SARA_DEBUG) printf("\tSize attropl List: %d\n", size);
+    
+    if ( size == -1 ) {
+      PyErr_SetString(PyExc_TypeError, "not a list");
+      return NULL; 
+    }
+    //printf("Size = %d\n", size);
+    
+    if (SARA_DEBUG) printf("\t<Contents>\n");
+    
+    arg2 = prev = NULL;
+    for ( i=0; i < size; i++ ) {
+      py_obj = PyList_GetItem(obj1, i);
+      if (SWIG_ConvertPtr(py_obj, (void **) &ptr, SWIGTYPE_p_attropl, 1)) {
+        sprintf(s,"list item %d has wrong type", i);
+        PyErr_SetString(PyExc_TypeError, s);
+        return NULL;
+        
+        // This will skipp the wrong entry
+        // continue;
+      }
+      
+      /* 
+           * Make first entry head of C linked list
+          */ 
+      if ( i == 0) {
+        arg2 = ptr;
+        ptr->next = prev;
+      }
+      else {
+        prev->next = ptr;
+        ptr->next = NULL;
+      }
+      prev = ptr;
+      
+    } // end for
+    if (SARA_DEBUG) printf("\t</Contents>\n");
+  }
   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   if (!SWIG_IsOK(res3)) {
@@ -7522,5 +7657,5 @@
   int val1 ;
   int ecode1 = 0 ;
-  void *argp2 = 0 ;
+  int temp2 ;
   int res2 = 0 ;
   int res3 ;
@@ -7538,9 +7673,14 @@
   } 
   arg1 = (int)(val1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "addreq_err" "', argument " "2"" of type '" "int *""'"); 
-  }
-  arg2 = (int *)(argp2);
+  if (!(SWIG_IsOK((res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2),SWIGTYPE_p_int,0))))) {
+    int val; 
+    int ecode = SWIG_AsVal_int(obj1, &val);
+    if (!SWIG_IsOK(ecode)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "addreq_err" "', argument " "2"" of type '" "int""'");
+    }
+    temp2 = (int)(val);
+    arg2 = &temp2;
+    res2 = SWIG_AddTmpMask(ecode);
+  }
   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   if (!SWIG_IsOK(res3)) {
@@ -7550,4 +7690,10 @@
   result = (int)addreq_err(arg1,arg2,arg3);
   resultobj = SWIG_From_int((int)(result));
+  if (SWIG_IsTmpObj(res2)) {
+    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
+  } else {
+    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
+    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
+  }
   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
   return resultobj;
@@ -7661,5 +7807,5 @@
   int *arg1 = (int *) 0 ;
   int arg2 ;
-  void *argp1 = 0 ;
+  int temp1 ;
   int res1 = 0 ;
   int val2 ;
@@ -7670,9 +7816,14 @@
   
   if (!PyArg_ParseTuple(args,(char *)"OO:getreq_err",&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getreq_err" "', argument " "1"" of type '" "int *""'"); 
-  }
-  arg1 = (int *)(argp1);
+  if (!(SWIG_IsOK((res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1),SWIGTYPE_p_int,0))))) {
+    int val; 
+    int ecode = SWIG_AsVal_int(obj0, &val);
+    if (!SWIG_IsOK(ecode)) {
+      SWIG_exception_fail(SWIG_ArgError(ecode), "in method '" "getreq_err" "', argument " "1"" of type '" "int""'");
+    }
+    temp1 = (int)(val);
+    arg1 = &temp1;
+    res1 = SWIG_AddTmpMask(ecode);
+  }
   ecode2 = SWIG_AsVal_int(obj1, &val2);
   if (!SWIG_IsOK(ecode2)) {
@@ -7682,4 +7833,10 @@
   result = (char *)getreq_err(arg1,arg2);
   resultobj = SWIG_FromCharPtr((const char *)result);
+  if (SWIG_IsTmpObj(res1)) {
+    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1)));
+  } else {
+    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
+    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags));
+  }
   return resultobj;
 fail:
Index: /devel/5.X/resmom.py
===================================================================
--- /devel/5.X/resmom.py	(revision 326)
+++ /devel/5.X/resmom.py	(revision 327)
@@ -87,7 +87,16 @@
   Get the default values from the mom daemon
   """
+  err = 0
+  print default_mom_res
   for res in default_mom_res:
-    addreq(id, res)
-    resp = getreq(id)
+    print res
+    #addreq(id, res)
+    addreq_err(id, err, res) 
+    print err
+    #resp = getreq(id)
+    resp = getreq_err(err, id)
+    print "error: ", err
+
+    print resp,id
     check_resp(d, resp)
 
Index: /devel/5.X/rm.h
===================================================================
--- /devel/5.X/rm.h	(revision 326)
+++ /devel/5.X/rm.h	(revision 327)
@@ -82,5 +82,4 @@
 ** to the resource monitor.
 */
-
 #ifdef __cplusplus
 extern "C"
@@ -92,10 +91,10 @@
 int downrm(int *, int);
 int configrm(int, int *, char *);
-int addreq_err(int, int *, char *);
+int addreq_err(int, int *INOUT, char *);
 int begin_rm_req(int ,int *,int );
 int addreq(int, char *);
 int allreq(char *);
-char* getreq_err(int *, int);
-char* getreq(int);
+char *getreq_err(int *INOUT, int);
+char *getreq(int);
 int flushreq(void);
 int activereq(void);
@@ -104,3 +103,2 @@
 }
 #endif
-
