6 #include "ace/Log_Msg.h"
7 #include "ace/OS_NS_string.h"
8 #include "ace/OS_NS_unistd.h"
9 #include "ace/OS_Memory.h"
11 // This function is pretty much a no-op that just sets up the
12 // appropriate lookup function to use.
15 PMC_All::encode (char *packet
, int &packet_length
)
17 if (Options::get_opt (Options::DEBUGGING
) != 0)
19 "in PMC_All::encode\n"));
21 ACE_NEW_RETURN (this->ss
,
25 SET_PACKET_TYPE (packet
, Options::PROTO_ALL
);
27 char *buf_ptr
= SKIP_PACKET_TYPE (packet
);
29 packet_length
= buf_ptr
- packet
;
33 // This method is responsible for transforming the msg from the server
34 // back into a form usable by the client. Note that it reads the
35 // REAL_NAME from the packet (since the server placed it there)...
38 PMC_All::decode (char *packet
, int &packet_length
)
40 if (Options::get_opt (Options::DEBUGGING
) != 0)
43 "in PMC_All::decode, packet_length = %d\n",
46 ACE_OS::write (ACE_STDERR
, packet
, packet_length
);
57 this->increment_total_users (remote_users
);
59 for (cp
= (char *) ACE::strend (cp
);
63 // Skip over the LOGIN_NAME.
65 char *login_name
= cp
;
66 char *real_name
= cp
= (char *) ACE::strend (cp
);
68 for (cp
= (char *) ACE::strend (cp
);
69 *(cp
= this->handle_protocol_entries (cp
, login_name
, real_name
)) != '\t';
78 PMC_All::insert_protocol_info (Protocol_Record
&protocol_record
)
80 Protocol_Record
*prp
= PM_Client::insert_protocol_info (protocol_record
);
81 int length
= ACE_OS::strlen (prp
->set_real (ACE::strnew (protocol_record
.get_real ())));
83 if (length
> this->max_key_length
)
84 this->max_key_length
= length
;
93 "remote users logged on\n"));
94 PM_Client::process ();