diff options
author | Günther Deschner <gd@samba.org> | 2009-02-13 12:47:32 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-02-23 16:17:36 +0100 |
commit | 418691c2e7eae156b10ae29cf443e26cede92e93 (patch) | |
tree | 36871d56029f656aba9330e2c703eb7bbbf10010 /source3 | |
parent | 9b453f9248de2fce117f029240530d199e039ce1 (diff) | |
download | samba-418691c2e7eae156b10ae29cf443e26cede92e93.tar.gz samba-418691c2e7eae156b10ae29cf443e26cede92e93.tar.bz2 samba-418691c2e7eae156b10ae29cf443e26cede92e93.zip |
s3-spoolss: use more idl types in spoolss server.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 5 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 24 |
2 files changed, 18 insertions, 11 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index fed1dd35fe..93b4ca8c7d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6206,8 +6206,11 @@ void spoolss_notify_cjobs(int snum, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer, TALLOC_CTX *mem_ctx); -void construct_info_data(struct spoolss_Notify *info_data, uint16 type, uint16 field, int id); WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u); +void construct_info_data(struct spoolss_Notify *info_data, + enum spoolss_NotifyType type, + enum spoolss_Field field, + int id); DEVICEMODE *construct_dev_mode(const char *servicename); WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u); WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u); diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a3daa7f372..33f139676c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3511,7 +3511,9 @@ static uint32_t variable_type_of_notify_info_data(enum spoolss_NotifyType type, /**************************************************************************** ****************************************************************************/ -static bool search_notify(uint16 type, uint16 field, int *value) +static bool search_notify(enum spoolss_NotifyType type, + enum spoolss_Field field, + int *value) { int i; @@ -3530,7 +3532,10 @@ static bool search_notify(uint16 type, uint16 field, int *value) /**************************************************************************** ****************************************************************************/ -void construct_info_data(struct spoolss_Notify *info_data, uint16 type, uint16 field, int id) +void construct_info_data(struct spoolss_Notify *info_data, + enum spoolss_NotifyType type, + enum spoolss_Field field, + int id) { info_data->type = type; info_data->field = field; @@ -3550,17 +3555,17 @@ static bool construct_notify_printer_info(Printer_entry *print_hnd, struct spool TALLOC_CTX *mem_ctx) { int field_num,j; - uint16 type; - uint16 field; + enum spoolss_NotifyType type; + enum spoolss_Field field; struct spoolss_Notify *current_data; NT_PRINTER_INFO_LEVEL *printer = NULL; print_queue_struct *queue=NULL; - type=option_type->type; + type = option_type->type; DEBUG(4,("construct_notify_printer_info: Notify type: [%s], number of notify info: [%d] on printer: [%s]\n", - (option_type->type==PRINTER_NOTIFY_TYPE?"PRINTER_NOTIFY_TYPE":"JOB_NOTIFY_TYPE"), + (type == PRINTER_NOTIFY_TYPE ? "PRINTER_NOTIFY_TYPE" : "JOB_NOTIFY_TYPE"), option_type->count, lp_servicename(snum))); if (!W_ERROR_IS_OK(get_a_printer(print_hnd, &printer, 2, lp_const_servicename(snum)))) @@ -3614,9 +3619,8 @@ static bool construct_notify_jobs_info(print_queue_struct *queue, TALLOC_CTX *mem_ctx) { int field_num,j; - uint16 type; - uint16 field; - + enum spoolss_NotifyType type; + enum spoolss_Field field; struct spoolss_Notify *current_data; DEBUG(4,("construct_notify_jobs_info\n")); @@ -3624,7 +3628,7 @@ static bool construct_notify_jobs_info(print_queue_struct *queue, type = option_type->type; DEBUGADD(4,("Notify type: [%s], number of notify info: [%d]\n", - (option_type->type==PRINTER_NOTIFY_TYPE?"PRINTER_NOTIFY_TYPE":"JOB_NOTIFY_TYPE"), + (type == PRINTER_NOTIFY_TYPE ? "PRINTER_NOTIFY_TYPE" : "JOB_NOTIFY_TYPE"), option_type->count)); for(field_num=0; field_num<option_type->count; field_num++) { |