errors: share dcerpc error function.
[ira/wip.git] / source3 / rpc_parse / parse_spoolss.c
index d762cb2ca7958fdbec2e853735812211d475ae0e..78a80a019b173c7ba95d1bf0027855ee407efc0e 100644 (file)
@@ -1164,7 +1164,7 @@ bool spoolss_io_r_open_printer(const char *desc, SPOOL_R_OPEN_PRINTER *r_u, prs_
        if (!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth))
                return False;   
 
-       if (!prs_werror("status code", ps, depth, &(r_u->status)))
+       if (!prs_werror("status", ps, depth, &(r_u->status)))
                return False;
                
        return True;
@@ -1225,7 +1225,7 @@ bool spoolss_io_r_open_printer_ex(const char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u
        if (!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth))
                return False;
 
-       if (!prs_werror("status code", ps, depth, &(r_u->status)))
+       if (!prs_werror("status", ps, depth, &(r_u->status)))
                return False;
 
        return True;
@@ -2129,7 +2129,12 @@ static bool smb_io_reldevmode(const char *desc, RPC_BUFFER *buffer, int depth, D
                }
                
                buffer->string_at_end -= ((*devmode)->size + (*devmode)->driverextra);
-               
+
+               /* mz:  we have to align the device mode for VISTA */
+               if (buffer->string_at_end % 4) {
+                       buffer->string_at_end += 4 - (buffer->string_at_end % 4);
+               }
+
                if(!prs_set_offset(ps, buffer->string_at_end))
                        return False;
                
@@ -7205,7 +7210,7 @@ bool make_spoolss_q_getprintprocessordirectory(SPOOL_Q_GETPRINTPROCESSORDIRECTOR
 
 bool spoolss_io_q_getprintprocessordirectory(const char *desc, SPOOL_Q_GETPRINTPROCESSORDIRECTORY *q_u, prs_struct *ps, int depth)
 {
-       uint32 ptr;
+       uint32 ptr = 0;
 
        prs_debug(ps, depth, desc, "spoolss_io_q_getprintprocessordirectory");
        depth++;
@@ -7719,4 +7724,3 @@ bool convert_port_data_1( NT_PORT_DATA_1 *port1, RPC_BUFFER *buf )
 
        return True;
 }
-