Changeset 2851
- Timestamp:
- 03/06/10 19:16:56 (5 months ago)
- Files:
-
- climm/doc/climmcmds.7 (modified) (4 diffs)
- climm/include/connection.h (modified) (2 diffs)
- climm/src/connection.c (modified) (2 diffs)
- climm/src/io/io_socks5.c (modified) (3 diffs)
- climm/src/jabber_base.cpp (modified) (2 diffs)
- climm/src/oscar_base.c (modified) (3 diffs)
- climm/src/oscar_dc.c (modified) (3 diffs)
- climm/src/oscar_dc_file.c (modified) (1 diff)
- climm/src/oscar_oldicq.c (modified) (1 diff)
- climm/src/oscar_service.c (modified) (2 diffs)
- climm/src/util_io.c (modified) (2 diffs)
- climm/src/xmpp_base.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
climm/doc/climmcmds.7
r2849 r2851 1006 1006 will be used. 1007 1007 .TP 1008 .BI webaware \ boolean\ connection[ICQ]1008 .BI webaware \ boolean\ server[ICQ] 1009 1009 Whether the current status should be visible on the web site. 1010 1010 .TP 1011 .BI hideip \ boolean\ connection[ICQ]1011 .BI hideip \ boolean\ server[ICQ] 1012 1012 Whether to hide the (local) IP address towards other users. 1013 1013 .TP 1014 .BI dcauth \ boolean\ connection[ICQ]1014 .BI dcauth \ boolean\ server[ICQ] 1015 1015 Whether authorized contacts can see the (remote) IP address. 1016 1016 .TP 1017 .BI dccont \ boolean\ connection[ICQ]1017 .BI dccont \ boolean\ server[ICQ] 1018 1018 Whether contacts can see the (remote) IP address. 1019 1019 .TP 1020 .BI countaway \ boolean\ connection1020 .BI countaway \ boolean\ server 1021 1021 If set, incoming messages will be counted and their originators shown 1022 1022 if the status is manually changed to anything other than … … 1034 1034 .IR invisible ). 1035 1035 .TP 1036 .BI s5_use \ boolean\ connection1036 .BI s5_use \ boolean\ server 1037 1037 Enable the use of a socks 5 proxy. New for 0.6.4. 1038 1038 .TP 1039 .BI s5_host \ string\ connection1039 .BI s5_host \ string\ server 1040 1040 Connect to socks 5 proxy on the given host. New for 0.6.4. 1041 1041 .TP 1042 .BI s5_port \ integer\ connection1042 .BI s5_port \ integer\ server 1043 1043 Connect to socks 5 proxy listening on the given port number. New for 0.6.4. 1044 1044 .TP 1045 .BI s5_name \ string\ connection1045 .BI s5_name \ string\ server 1046 1046 Identify as the given user to the socks 5 proxy. New for 0.6.4. 1047 1047 .TP 1048 .BI s5_pass \ string\ connection1048 .BI s5_pass \ string\ server 1049 1049 Authenticate with the given password to the socks 5 proxy. New for 0.6.4. 1050 1050 .TP 1051 .BI oscar_dc_port \ integer\ connection[ICQ]1052 Define the minimum port to listen for incoming direct connection when using1051 .BI oscar_dc_port \ integer\ server[ICQ] 1052 Define the minimum port to listen for incoming direct connections when using 1053 1053 the oscar protocol. If the given port is in used, the port number actually 1054 1054 used is increased until a free one is found. New for 0.6.4. 1055 1055 .TP 1056 .BI oscar_dc_mode \ integer\ connection[ICQ]1056 .BI oscar_dc_mode \ integer\ server[ICQ] 1057 1057 .RS 1058 1058 This integer is for flags how to handle direct connections: … … 1079 1079 .RE 1080 1080 .TP 1081 .BI logstream \ boolean\ connection1081 .BI logstream \ boolean\ server 1082 1082 Log all data sent over the connection to the server into a file in 1083 1083 BASEDIR/debug/. 1084 1084 .TP 1085 .BI privacylist \ string\ connection[XMPP]1085 .BI privacylist \ string\ server[XMPP] 1086 1086 After login, select the given privacy list as the active list for this 1087 1087 session. If the list is empty, select no privacy list as active. Otherwise, … … 1199 1199 New for 0.5. 1200 1200 .TP 1201 .BI opt connection\ [<option>\ [<value>]]1202 Set or display connectionoption1201 .BI optserv \ [<option>\ [<value>]] 1202 Set or display server option 1203 1203 .IR option . 1204 New for0.5.1204 Renamed for 0.7.1, old name new in 0.5. 1205 1205 .TP 1206 1206 .BI optglobal \ [<option>\ [<value>]] climm/include/connection.h
r2847 r2851 115 115 Connection *ServerFindChild (const Server *parent, const Contact *cont, UWORD type); 116 116 const char *ServerStrType (Server *conn); 117 val_t ServerPrefVal (Server *conn, UDWORD flag); 118 const char *ServerPrefStr (Server *conn, UDWORD flag); 117 119 118 120 Connection *ConnectionC (UWORD type DEBUGPARAM); … … 122 124 const char *ConnectionServerType (UWORD type); 123 125 UWORD ConnectionServerNType (const char *type, char del); 124 val_t ConnectionPrefVal (Server *conn, UDWORD flag);125 const char *ConnectionPrefStr (Server *conn, UDWORD flag);126 126 127 127 #define ConnectionC(t) ConnectionC (t DEBUGARGS) climm/src/connection.c
r2748 r2851 491 491 * Query an option for a contact group 492 492 */ 493 val_t ConnectionPrefVal (Server *serv, UDWORD flag)493 val_t ServerPrefVal (Server *serv, UDWORD flag) 494 494 { 495 495 val_t res = 0; … … 504 504 * Query an option for a contact group 505 505 */ 506 const char * ConnectionPrefStr (Server *serv, UDWORD flag)506 const char *ServerPrefStr (Server *serv, UDWORD flag) 507 507 { 508 508 const char *res = 0; climm/src/io/io_socks5.c
r2843 r2851 108 108 static void io_socks5_open (Connection *conn, Dispatcher *d) 109 109 { 110 const char *socks5server = ConnectionPrefStr (conn->serv, CO_S5HOST);111 UDWORD socks5port = ConnectionPrefVal (conn->serv, CO_S5PORT);110 const char *socks5server = ServerPrefStr (conn->serv, CO_S5HOST); 111 UDWORD socks5port = ServerPrefVal (conn->serv, CO_S5PORT); 112 112 char *origserver = conn->server; 113 113 UDWORD origport = conn->port, origip = conn->ip; … … 151 151 if (rc != IO_CONNECTED) 152 152 return io_socks5_seterr (d, rc, d->next->funcs->f_err (conn, d->next)); 153 if ( ConnectionPrefVal (conn->serv, CO_S5NAME) && ConnectionPrefVal (conn->serv, CO_S5PASS))153 if (ServerPrefVal (conn->serv, CO_S5NAME) && ServerPrefVal (conn->serv, CO_S5PASS)) 154 154 e = io_util_write (conn, d->next, "\x05\x02\x02\x00", 4); 155 155 else … … 174 174 if (d->flags == FLAG_SEND_CRED) 175 175 { 176 const char *socks5name = ConnectionPrefStr (conn->serv, CO_S5NAME);177 const char *socks5pass = ConnectionPrefStr (conn->serv, CO_S5PASS);176 const char *socks5name = ServerPrefStr (conn->serv, CO_S5NAME); 177 const char *socks5pass = ServerPrefStr (conn->serv, CO_S5PASS); 178 178 if (!socks5name || !socks5pass) 179 179 return io_socks5_seterr (d, IO_RW, i18n (1599, "[SOCKS] Authentication method incorrect")); climm/src/jabber_base.cpp
r2748 r2851 1018 1018 if (area == gloox::LogAreaXmlIncoming) 1019 1019 { 1020 if ( ConnectionPrefVal (m_serv, CO_LOGSTREAM))1020 if (ServerPrefVal (m_serv, CO_LOGSTREAM)) 1021 1021 CLIMMXMPPSave (m_serv, message.c_str(), 1); 1022 1022 DebugH (DEB_XMPPIN, "%s/%s: %s", lt, la, message.c_str()); … … 1024 1024 else if (area == gloox::LogAreaXmlOutgoing) 1025 1025 { 1026 if ( ConnectionPrefVal (m_serv, CO_LOGSTREAM))1026 if (ServerPrefVal (m_serv, CO_LOGSTREAM)) 1027 1027 CLIMMXMPPSave (m_serv, message.c_str(), 0); 1028 1028 DebugH (DEB_XMPPOUT, "%s/%s: %s", lt, la, message.c_str()); climm/src/oscar_base.c
r2819 r2851 451 451 } 452 452 453 if ( ConnectionPrefVal (serv, CO_LOGSTREAM))453 if (ServerPrefVal (serv, CO_LOGSTREAM)) 454 454 FlapSave (serv, pak, FALSE); 455 455 … … 603 603 UtilIOConnectTCP (serv->conn); 604 604 rl_printf ("\n"); 605 if ((v = ConnectionPrefVal (serv, CO_OSCAR_DC_MODE)))605 if ((v = ServerPrefVal (serv, CO_OSCAR_DC_MODE))) 606 606 { 607 607 Connection *conn = serv->oscar_dc; … … 688 688 rl_print (COLEXDENT "\r"); 689 689 } 690 if ( ConnectionPrefVal (serv, CO_LOGSTREAM))690 if (ServerPrefVal (serv, CO_LOGSTREAM)) 691 691 FlapSave (serv, pak, TRUE); 692 692 climm/src/oscar_dc.c
r2824 r2851 116 116 list->ip = 0; 117 117 s_repl (&list->server, NULL); 118 list->port = ConnectionPrefVal (list->serv, CO_OSCAR_DC_PORT);118 list->port = ServerPrefVal (list->serv, CO_OSCAR_DC_PORT); 119 119 list->cont = list->serv->conn->cont; 120 120 … … 715 715 PacketWriteB4 (pak, peer->serv->conn->our_outside_ip); /* our (remote) IP */ 716 716 PacketWriteB4 (pak, peer->serv->conn->our_local_ip); /* our (local) IP */ 717 PacketWrite1 (pak, ConnectionPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */717 PacketWrite1 (pak, ServerPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */ 718 718 PacketWrite4 (pak, peer->serv->oscar_dc->port); /* our (other) port */ 719 719 PacketWrite4 (pak, peer->oscar_our_session); /* session id */ … … 765 765 PacketWriteB4 (pak, peer->serv->conn->our_outside_ip); /* our (remote) IP */ 766 766 PacketWriteB4 (pak, peer->serv->conn->our_local_ip); /* our (local) IP */ 767 PacketWrite1 (pak, ConnectionPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */767 PacketWrite1 (pak, ServerPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */ 768 768 PacketWrite4 (pak, peer->serv->oscar_dc->port); /* our (other) port */ 769 769 PacketWrite4 (pak, peer->oscar_our_session); /* session id */ climm/src/oscar_dc_file.c
r2839 r2851 89 89 flist->version = serv->oscar_dc->version; 90 90 flist->cont = serv->oscar_dc->cont; 91 flist->port = ConnectionPrefVal (serv, CO_OSCAR_DC_PORT);91 flist->port = ServerPrefVal (serv, CO_OSCAR_DC_PORT); 92 92 flist->dispatch = &TCPDispatchMain; 93 93 climm/src/oscar_oldicq.c
r2538 r2851 533 533 PacketWriteB4 (pak, 0); 534 534 PacketWrite1 (pak, serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK 535 ? ConnectionPrefVal (serv, CO_OSCAR_DC_MODE) & 15 : 0);535 ? ServerPrefVal (serv, CO_OSCAR_DC_MODE) & 15 : 0); 536 536 PacketWrite2 (pak, serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK 537 537 ? serv->oscar_dc->version : 0); climm/src/oscar_service.c
r2825 r2851 358 358 statusflag_t flags = imf_none; 359 359 360 if ( ConnectionPrefVal (serv, CO_WEBAWARE))360 if (ServerPrefVal (serv, CO_WEBAWARE)) 361 361 flags |= imf_web; 362 if ( ConnectionPrefVal (serv, CO_DCAUTH))362 if (ServerPrefVal (serv, CO_DCAUTH)) 363 363 flags |= imf_dcauth; 364 if ( ConnectionPrefVal (serv, CO_DCCONT))364 if (ServerPrefVal (serv, CO_DCCONT)) 365 365 flags |= imf_dccont; 366 366 … … 384 384 PacketWriteB2 (pak, 0x0c); /* TLV 0C */ 385 385 PacketWriteB2 (pak, 0x25); 386 PacketWriteB4 (pak, ConnectionPrefVal (serv, CO_HIDEIP) ? 0 : serv->conn->our_local_ip);386 PacketWriteB4 (pak, ServerPrefVal (serv, CO_HIDEIP) ? 0 : serv->conn->our_local_ip); 387 387 if (serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK) 388 388 { 389 389 PacketWriteB4 (pak, serv->oscar_dc->port); 390 PacketWrite1 (pak, ConnectionPrefVal (serv, CO_OSCAR_DC_MODE) & 15);390 PacketWrite1 (pak, ServerPrefVal (serv, CO_OSCAR_DC_MODE) & 15); 391 391 PacketWriteB2 (pak, serv->oscar_dc->version); 392 392 PacketWriteB4 (pak, serv->oscar_dc->oscar_our_session); climm/src/util_io.c
r2822 r2851 47 47 void UtilIOConnectTCP (Connection *conn) 48 48 { 49 if ( ConnectionPrefVal (conn->serv, CO_S5USE))49 if (ServerPrefVal (conn->serv, CO_S5USE)) 50 50 return IOConnectSocks5 (conn); 51 51 return IOConnectTCP (conn); … … 54 54 void UtilIOListenTCP (Connection *conn) 55 55 { 56 if ( ConnectionPrefVal (conn->serv, CO_S5USE))56 if (ServerPrefVal (conn->serv, CO_S5USE)) 57 57 return IOListenSocks5 (conn); 58 58 return IOListenTCP (conn); climm/src/xmpp_base.c
r2850 r2851 211 211 DebugH (DEB_XMPPOUT, "%s", data); 212 212 213 if (! ConnectionPrefVal (serv, CO_LOGSTREAM))213 if (!ServerPrefVal (serv, CO_LOGSTREAM)) 214 214 return; 215 215 … … 1372 1372 1373 1373 { 1374 const char *list = ConnectionPrefStr (serv, CO_XMPP_PRIV);1374 const char *list = ServerPrefStr (serv, CO_XMPP_PRIV); 1375 1375 if (list) 1376 1376 XMPPSendIqPrivacy (serv, p_active, list); … … 1582 1582 conn->serv->xmpp_id = iks_id_new (iks_parser_stack (prs), 1583 1583 s_sprintf ("%s@%s/climm", conn->serv->xmpp_id->user, conn->serv->xmpp_id->server)); 1584 if ( ConnectionPrefVal (conn->serv, CO_TAGRESSOURCE) || ConnectionPrefVal (conn->serv, CO_AUTOTAGRES))1584 if (ServerPrefVal (conn->serv, CO_TAGRESSOURCE) || ServerPrefVal (conn->serv, CO_AUTOTAGRES)) 1585 1585 conn->serv->xmpp_id = iks_id_new (iks_parser_stack (prs), 1586 1586 s_sprintf ("%s/%s%04X%04X", conn->serv->xmpp_id->partial, conn->serv->xmpp_id->resource, rand() % 0xffff, rand() % 0xffff));
