Re: [Openprinting-papi-dev] (svc->authCB)(svc) at source/libpapi-ipp/ipp-support.c:436
Brought to you by:
njacobs,
shawn_pratt
From: Norm J. <Norm.Jacobs@Sun.COM> - 2006-05-01 15:00:42
|
It's ok for now. I was hoping to find a solution that doesn't require the implementation specific service structures to begin the same way and relie on this. You are going to want to put a comment in the papi_impl.h header files before each service_t structure that explains this. Maybe devine inspiration will hit me and I will come up with a way of doing this without breaking the interface and without imposing this new requirement on the print service/protocol implementation specific service_t structures. -Norm Kouhei Sutou wrote: > Hi, > > 2006/4/28, Norm Jacobs <Nor...@su...>: > >> That is going to be a real problem. We need to be able to update >> the service context from within the callback. I will look into it >> further. > > > This problem can be fixed the attached patch. > Any opinions? > >> Oddly, I have used this to authenticate with a CUPS server over IPP and >> it worked. > > > Did you use papiServiceSetXXX API? I think you might set > some values directory by service->XXX = YYY. > > > Thanks, > -- > kou > >------------------------------------------------------------------------ > >Index: source/libpapi-dynamic/papi_impl.h >=================================================================== >--- source/libpapi-dynamic/papi_impl.h (revision 157) >+++ source/libpapi-dynamic/papi_impl.h (working copy) >@@ -49,9 +49,11 @@ > */ > > typedef struct { >- papi_attribute_t **attributes; >+ int peer_fd; > void *so_handle; > void *svc_handle; >+ >+ papi_attribute_t **attributes; > char *name; > char *user; > char *password; >@@ -59,7 +61,6 @@ > papi_encryption_t encryption; > void *app_data; > uri_t *uri; >- int peer_fd; > } service_t; > > typedef struct job { >Index: source/libpapi-ipp/papi_impl.h >=================================================================== >--- source/libpapi-ipp/papi_impl.h (revision 157) >+++ source/libpapi-ipp/papi_impl.h (working copy) >@@ -56,6 +56,10 @@ > } http_transfer_encoding_t; > > typedef struct { >+ int peer_fd; >+ void *so_handle; >+ void *svc_handle; >+ > papi_attribute_t **attributes; > char *name; > char *user; >@@ -64,6 +68,7 @@ > papi_encryption_t encryption; > void *app_data; > uri_t *uri; >+ > char *post; > http_t *connection; > http_transfer_encoding_t transfer_encoding; >Index: source/libpapi-lpd/papi_impl.h >=================================================================== >--- source/libpapi-lpd/papi_impl.h (revision 157) >+++ source/libpapi-lpd/papi_impl.h (working copy) >@@ -64,11 +64,19 @@ > } cache_t; > > typedef struct { >+ int peer_fd; /* unused */ >+ void *so_handle; /* unused */ >+ void *svc_handle; /* unused */ >+ > papi_attribute_t **attributes; /* extra info */ >+ char *name; /* unused */ >+ char *user; /* unused */ >+ char *password; /* unused */ >+ int (*authCB)(papi_service_t svc); /* unused */ >+ void *app_data; /* unused */ > uri_t *uri; /* printer uri */ >+ > cache_t *cache; /* printer/job cache */ >- int (*authCB)(papi_service_t svc); /* unused */ >- void *app_data; /* unused */ > } service_t; > > > > |