* See the file LICENSE for details.
*
* $Log: yaz-my-server.cpp,v $
- * Revision 1.1 2001-03-27 14:47:45 adam
+ * Revision 1.2 2001-03-29 15:14:26 adam
+ * Minor updates.
+ *
+ * Revision 1.1 2001/03/27 14:47:45 adam
* New server facility scheme.
*
* Revision 1.15 2001/03/26 14:43:49 adam
class MyServer : public Yaz_Z_Server {
public:
+ ~MyServer();
MyServer(IYaz_PDU_Observable *the_PDU_Observable);
IYaz_PDU_Observer* sessionNotify(IYaz_PDU_Observable *the_PDU_Observable,
int fd);
void connectNotify();
private:
+ MyRetrieval *m_retrieval;
+ MyILL *m_ill;
int m_no;
};
strlen(rec));
}
+MyServer::~MyServer()
+{
+ delete m_ill;
+ delete m_retrieval;
+}
+
IYaz_PDU_Observer *MyServer::sessionNotify(
IYaz_PDU_Observable *the_PDU_Observable, int fd)
{
MyServer *new_server;
- MyRetrieval *new_ret = new MyRetrieval;
- MyILL *new_ill = new MyILL;
m_no++;
new_server = new MyServer(the_PDU_Observable);
new_server->timeout(900);
- new_server->facility_add(new_ret, "my sr");
- new_server->facility_add(new_ill, "my ill");
+ new_server->m_retrieval = new MyRetrieval;
+ new_server->m_ill = new MyILL;
+ new_server->facility_add(new_server->m_retrieval, "my sr");
+ new_server->facility_add(new_server->m_ill, "my ill");
new_server->set_APDU_log(get_APDU_log());
Yaz_Z_Server (the_PDU_Observable)
{
m_no = 0;
+ m_ill = 0;
+ m_retrieval = 0;
}
void MyServer::timeoutNotify()
* See the file LICENSE for details.
*
* $Log: yaz-z-server-ill.cpp,v $
- * Revision 1.1 2001-03-27 14:47:45 adam
+ * Revision 1.2 2001-03-29 15:14:26 adam
+ * Minor updates.
+ *
+ * Revision 1.1 2001/03/27 14:47:45 adam
* New server facility scheme.
*
*/
}
int Yaz_Facility_ILL::init(Yaz_Z_Server *s, Z_InitRequest *initRequest,
- Z_InitResponse *initResponse)
+ Z_InitResponse *initResponse)
{
Z_Options *req = initRequest->options;
Z_Options *res = initResponse->options;
* See the file LICENSE for details.
*
* $Log: yaz-z-server.cpp,v $
- * Revision 1.8 2001-03-27 14:47:45 adam
+ * Revision 1.9 2001-03-29 15:14:26 adam
+ * Minor updates.
+ *
+ * Revision 1.8 2001/03/27 14:47:45 adam
* New server facility scheme.
*
* Revision 1.7 2001/03/26 14:43:49 adam
Yaz_Z_Server_Facility_Info *p_next = p->m_next;
delete [] p->m_name;
- delete [] p->m_facility;
delete p;
p = p_next;
}