Mercurial > pidgin
changeset 11829:4669e7461968
[gaim-migrate @ 14120]
Regular comment changes. I'm sorry to force a big recompilation. It had to be done at some point, though, and I've tried to do this all in one day.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 26 Oct 2005 00:34:26 +0000 |
parents | 5c50be815a4e |
children | 9cd233ea2799 |
files | src/gtkwhiteboard.c src/ntlm.c src/protocols/bonjour/bonjour.c src/protocols/bonjour/dns_sd.c src/protocols/simple/simple.h src/protocols/simple/sipmsg.h src/stun.h src/win32/win32dep.c |
diffstat | 8 files changed, 104 insertions(+), 96 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkwhiteboard.c Wed Oct 26 00:33:21 2005 +0000 +++ b/src/gtkwhiteboard.c Wed Oct 26 00:34:26 2005 +0000 @@ -69,9 +69,9 @@ static gboolean LocalShutdownRequest; -static int LastX; // Tracks last position of the mouse when drawing +static int LastX; /* Tracks last position of the mouse when drawing */ static int LastY; -static int MotionCount; // Tracks how many brush motions made +static int MotionCount; /* Tracks how many brush motions made */ static int BrushState = BRUSH_STATE_UP; static GaimWhiteboardUiOps ui_ops =
--- a/src/ntlm.c Wed Oct 26 00:33:21 2005 +0000 +++ b/src/ntlm.c Wed Oct 26 00:34:26 2005 +0000 @@ -31,80 +31,84 @@ #include <string.h> struct type1_message { - guint8 protocol[8]; /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' */ - guint8 type; /* 0x01 */ - guint8 zero1[3]; + guint8 protocol[8]; /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' */ + guint8 type; /* 0x01 */ + guint8 zero1[3]; short flags; /* 0xb203 */ - guint8 zero2[2]; + guint8 zero2[2]; - short dom_len1; /* domain string length */ - short dom_len2; /* domain string length */ + short dom_len1; /* domain string length */ + short dom_len2; /* domain string length */ short dom_off; /* domain string offset */ - guint8 zero3[2]; + guint8 zero3[2]; - short host_len1; /* host string length */ - short host_len2; /* host string length */ + short host_len1; /* host string length */ + short host_len2; /* host string length */ short host_off; /* host string offset (always 0x20) */ - guint8 zero4[2]; + guint8 zero4[2]; -/* guint8 host[*]; // host string (ASCII) - guint8 dom[*]; // domain string (ASCII) */ +#if 0 + guint8 host[*]; /* host string (ASCII) */ + guint8 dom[*]; /* domain string (ASCII) */ +#endif }; struct type2_message { - guint8 protocol[8]; /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'*/ - guint8 type; /* 0x02 */ - guint8 zero1[7]; + guint8 protocol[8]; /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'*/ + guint8 type; /* 0x02 */ + guint8 zero1[7]; short msg_len; /* 0x28 */ - guint8 zero2[2]; + guint8 zero2[2]; short flags; /* 0x8201 */ - guint8 zero3[2]; + guint8 zero3[2]; - guint8 nonce[8]; /* nonce */ - guint8 zero[8]; + guint8 nonce[8]; /* nonce */ + guint8 zero[8]; }; struct type3_message { - guint8 protocol[8]; /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'*/ - guint8 type; /* 0x03 */ - guint8 zero1[3]; + guint8 protocol[8]; /* 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'*/ + guint8 type; /* 0x03 */ + guint8 zero1[3]; - short lm_resp_len1; /* LanManager response length (always 0x18)*/ - short lm_resp_len2; /* LanManager response length (always 0x18)*/ + short lm_resp_len1; /* LanManager response length (always 0x18)*/ + short lm_resp_len2; /* LanManager response length (always 0x18)*/ short lm_resp_off; /* LanManager response offset */ - guint8 zero2[2]; + guint8 zero2[2]; - short nt_resp_len1; /* NT response length (always 0x18) */ - short nt_resp_len2; /* NT response length (always 0x18) */ + short nt_resp_len1; /* NT response length (always 0x18) */ + short nt_resp_len2; /* NT response length (always 0x18) */ short nt_resp_off; /* NT response offset */ - guint8 zero3[2]; + guint8 zero3[2]; - short dom_len1; /* domain string length */ - short dom_len2; /* domain string length */ + short dom_len1; /* domain string length */ + short dom_len2; /* domain string length */ short dom_off; /* domain string offset (always 0x40) */ - guint8 zero4[2]; + guint8 zero4[2]; - short user_len1; /* username string length */ - short user_len2; /* username string length */ + short user_len1; /* username string length */ + short user_len2; /* username string length */ short user_off; /* username string offset */ - guint8 zero5[2]; + guint8 zero5[2]; - short host_len1; /* host string length */ - short host_len2; /* host string length */ + short host_len1; /* host string length */ + short host_len2; /* host string length */ short host_off; /* host string offset */ - guint8 zero6[6]; + guint8 zero6[6]; short msg_len; /* message length */ - guint8 zero7[2]; + guint8 zero7[2]; short flags; /* 0x8201 */ - guint8 zero8[2]; + guint8 zero8[2]; -/* guint8 dom[*]; // domain string (unicode UTF-16LE) - guint8 user[*]; // username string (unicode UTF-16LE) - guint8 host[*]; // host string (unicode UTF-16LE) - guint8 lm_resp[*]; // LanManager response - guint8 nt_resp[*]; // NT response*/ +#if 0 + guint8 dom[*]; /* domain string (unicode UTF-16LE) */ + guint8 user[*]; /* username string (unicode UTF-16LE) */ + guint8 host[*]; /* host string (unicode UTF-16LE) */ + guint8 lm_resp[*]; /* LanManager response */ + guint8 nt_resp[*]; /* NT response */ +#endif }; gchar *gaim_ntlm_gen_type1(gchar *hostname, gchar *domain) {
--- a/src/protocols/bonjour/bonjour.c Wed Oct 26 00:33:21 2005 +0000 +++ b/src/protocols/bonjour/bonjour.c Wed Oct 26 00:34:26 2005 +0000 @@ -78,23 +78,23 @@ gc->proto_data = g_new(BonjourData, 1); bd = gc->proto_data; - // Start waiting for jabber connections (iChat style) + /* Start waiting for jabber connections (iChat style) */ bd->jabber_data = g_new(BonjourJabber, 1); bd->jabber_data->name = gc->account->username; bd->jabber_data->port = gaim_account_get_int(account, "port", BONJOUR_DEFAULT_PORT_INT); bd->jabber_data->account = account; if (bonjour_jabber_start(bd->jabber_data) == -1) { - // Send a message about the connection error + /* Send a message about the connection error */ gaim_debug_error("bonjour", "Unable to listen to ichat connections"); - // Free the data + /* Free the data */ g_free(bd->jabber_data); g_free(bd); return; } - // Connect to the mDNS daemon looking for buddies in the LAN + /* Connect to the mDNS daemon looking for buddies in the LAN */ bd->dns_sd_data = bonjour_dns_sd_new(); bd->dns_sd_data->name = (sw_string)gaim_account_get_username(account); bd->dns_sd_data->txtvers = g_strdup("1"); @@ -103,7 +103,7 @@ bd->dns_sd_data->last = g_strdup(gaim_account_get_string(account, "last", "")); bd->dns_sd_data->port_p2pj = gaim_account_get_int(account, "port", BONJOUR_DEFAULT_PORT_INT); bd->dns_sd_data->phsh = g_strdup(""); - bd->dns_sd_data->status = g_strdup("avail"); //<-- Check the real status if different from avail + bd->dns_sd_data->status = g_strdup("avail"); /* Check the real status if different from avail */ bd->dns_sd_data->email = g_strdup(gaim_account_get_string(account, "email", "")); bd->dns_sd_data->vc = g_strdup(""); bd->dns_sd_data->jid = g_strdup(""); @@ -113,11 +113,11 @@ bd->dns_sd_data->account = account; bonjour_dns_sd_start(bd->dns_sd_data); - // Create a group for bonjour buddies + /* Create a group for bonjour buddies */ bonjour_group = gaim_group_new(BONJOUR_GROUP_NAME); gaim_blist_add_group(bonjour_group, NULL); - // Show the buddy list by telling Gaim we have already connected + /* Show the buddy list by telling Gaim we have already connected */ gaim_connection_set_state(gc, GAIM_CONNECTED); } @@ -127,7 +127,7 @@ GaimGroup *bonjour_group = gaim_find_group(BONJOUR_GROUP_NAME); BonjourData *bd = (BonjourData*)connection->proto_data; - // Stop looking for buddies in the LAN + /* Stop looking for buddies in the LAN */ if (connection != NULL) { bonjour_dns_sd_stop(bd->dns_sd_data); if (bd != NULL) { @@ -135,14 +135,14 @@ } } - // Stop waiting for conversations + /* Stop waiting for conversations */ bonjour_jabber_stop(bd->jabber_data); g_free(bd->jabber_data); - // Remove all the bonjour buddies + /* Remove all the bonjour buddies */ bonjour_removeallfromlocal(connection); - // Delete the bonjour group + /* Delete the bonjour group */ gaim_blist_remove_group(bonjour_group); } @@ -404,11 +404,11 @@ strcpy(hostname, "localhost"); } - // Creating the user splits + /* Creating the user splits */ split = gaim_account_user_split_new(_("Host name"), hostname, '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); - // Creating the options for the protocol + /* Creating the options for the protocol */ option = gaim_account_option_int_new(_("Port"), "port", 5298); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
--- a/src/protocols/bonjour/dns_sd.c Wed Oct 26 00:33:21 2005 +0000 +++ b/src/protocols/bonjour/dns_sd.c Wed Oct 26 00:34:26 2005 +0000 @@ -21,7 +21,7 @@ #include "buddy.h" #include "debug.h" -// Private data +/* Private data */ typedef struct _dns_sd_packet { @@ -40,9 +40,9 @@ gchar *AIM; } dns_sd_packet; -// End private data +/* End private data */ -// Private functions +/* Private functions */ static sw_result HOWL_API _publish_reply(sw_discovery discovery, sw_discovery_oid oid, @@ -50,7 +50,7 @@ { gaim_debug_warning("bonjour", "_publish_reply --> Start\n"); - // Check the answer from the mDNS daemon + /* Check the answer from the mDNS daemon */ switch (status) { case SW_DISCOVERY_PUBLISH_STARTED : @@ -101,18 +101,18 @@ sw_discovery_cancel(discovery, oid); - // Get the ip as a string + /* Get the ip as a string */ ip = malloc(address_length); sw_ipv4_address_name(address, ip, address_length); - // Obtain the parameters from the text_record + /* Obtain the parameters from the text_record */ if ((text_record_len > 0) && (text_record) && (*text_record != '\0')) { sw_text_record_iterator_init(&iterator, text_record, text_record_len); while (sw_text_record_iterator_next(iterator, key, (sw_octet *)value, &value_length) == SW_OKAY) { - // Compare the keys with the possible ones and save them on - // the appropiate place of the buddy_list + /* Compare the keys with the possible ones and save them on */ + /* the appropiate place of the buddy_list */ if (strcmp(key, "txtvers") == 0) { txtvers = g_strdup(value); } else if (strcmp(key, "version") == 0) { @@ -141,8 +141,8 @@ } } - // Put the parameters of the text_record in a buddy and add the buddy to - // the buddy list + /* Put the parameters of the text_record in a buddy and add the buddy to */ + /* the buddy list */ buddy = bonjour_buddy_new((gchar *)name, first, port_p2pj, phsh, status, email, last, jid, AIM, vc, ip, msg); @@ -154,7 +154,7 @@ /* Add or update the buddy in our buddy list */ bonjour_buddy_add_to_gaim(account, buddy); - // Free all the temporal strings + /* Free all the temporal strings */ g_free(txtvers); g_free(version); g_free(first); @@ -199,7 +199,7 @@ gaim_debug_warning("bonjour", "_browser_reply --> Remove domain\n"); break; case SW_DISCOVERY_BROWSE_ADD_SERVICE: - // A new peer has join the network and uses iChat bonjour + /* A new peer has join the network and uses iChat bonjour */ gaim_debug_info("bonjour", "_browser_reply --> Add service\n"); if (g_ascii_strcasecmp(name, account->username) != 0) { @@ -235,7 +235,7 @@ sw_text_record dns_data; sw_result publish_result = SW_OKAY; - // Fill the data for the service + /* Fill the data for the service */ if (sw_text_record_init(&dns_data) != SW_OKAY) { gaim_debug_error("bonjour", "Unable to initialize the data for the mDNS."); @@ -246,7 +246,7 @@ sw_text_record_add_key_and_string_value(dns_data, "version", data->version); sw_text_record_add_key_and_string_value(dns_data, "1st", data->first); sw_text_record_add_key_and_string_value(dns_data, "last", data->last); - // sw_text_record_add_key_and_string_value(dns_data, "port.p2pj", itoa(data->port_p2pj)); + /* sw_text_record_add_key_and_string_value(dns_data, "port.p2pj", itoa(data->port_p2pj)); */ sw_text_record_add_key_and_string_value(dns_data, "port.p2pj", BONJOUR_DEFAULT_PORT); sw_text_record_add_key_and_string_value(dns_data, "phsh", data->phsh); sw_text_record_add_key_and_string_value(dns_data, "status", data->status); @@ -256,7 +256,7 @@ sw_text_record_add_key_and_string_value(dns_data, "jid", data->jid); sw_text_record_add_key_and_string_value(dns_data, "AIM", data->AIM); - // Publish the service + /* Publish the service */ switch (type) { case PUBLISH_START: @@ -275,7 +275,7 @@ return -1; } - // Free the memory used by temp data + /* Free the memory used by temp data */ sw_text_record_fina(dns_data); return 0; @@ -287,7 +287,7 @@ sw_discovery_read_socket(*((sw_discovery*)data)); } -// End private functions +/* End private functions */ /** * Allocate space for the dns-sd data. @@ -326,8 +326,8 @@ data->status = g_strdup(status); data->msg = g_strdup(status_message); - // Update our text record with the new status - _dns_sd_publish(data, PUBLISH_UPDATE); // <--We must control the errors + /* Update our text record with the new status */ + _dns_sd_publish(data, PUBLISH_UPDATE); /* <--We must control the errors */ } /** @@ -345,7 +345,7 @@ account = data->account; gc = gaim_account_get_connection(account); - // Initilizations of the dns-sd data and session + /* Initilizations of the dns-sd data and session */ data->session = malloc(sizeof(sw_discovery)); if (sw_discovery_init(data->session) != SW_OKAY) { @@ -353,10 +353,10 @@ return; } - // Publish our bonjour IM client at the mDNS daemon - _dns_sd_publish(data, PUBLISH_START); // <--We must control the errors + /* Publish our bonjour IM client at the mDNS daemon */ + _dns_sd_publish(data, PUBLISH_START); /* <--We must control the errors */ - // Advise the daemon that we are waiting for connections + /* Advise the daemon that we are waiting for connections */ if (sw_discovery_browse(*(data->session), 0, ICHAT_SERVICE, NULL, _browser_reply, data->account, &session_id) != SW_OKAY) { @@ -364,8 +364,8 @@ return; } - // Get the socket that communicates with the mDNS daemon and bind it to a - // callback that will handle the dns_sd packets + /* Get the socket that communicates with the mDNS daemon and bind it to a */ + /* callback that will handle the dns_sd packets */ dns_sd_socket = sw_discovery_socket(*(data->session)); gc->inpa = gaim_input_add(dns_sd_socket, GAIM_INPUT_READ, _dns_sd_handle_packets, data->session);
--- a/src/protocols/simple/simple.h Wed Oct 26 00:33:21 2005 +0000 +++ b/src/protocols/simple/simple.h Wed Oct 26 00:34:26 2005 +0000 @@ -67,7 +67,7 @@ int cseq; time_t reregister; time_t republish; - int registerstatus; // 0 nothing, 1 first registration send, 2 auth received, 3 registered + int registerstatus; /* 0 nothing, 1 first registration send, 2 auth received, 3 registered */ struct sip_auth registrar; struct sip_auth proxy; int listenfd; @@ -106,7 +106,7 @@ struct transaction { time_t time; int retries; - int transport; // 0 = tcp, 1 = udp + int transport; /* 0 = tcp, 1 = udp */ int fd; gchar *cseq; struct sipmsg *msg;
--- a/src/protocols/simple/sipmsg.h Wed Oct 26 00:33:21 2005 +0000 +++ b/src/protocols/simple/sipmsg.h Wed Oct 26 00:34:26 2005 +0000 @@ -26,7 +26,7 @@ #include <glib.h> struct sipmsg { - int response; // 0 means request, otherwise response code + int response; /* 0 means request, otherwise response code */ gchar *method; gchar *target; GSList *headers;
--- a/src/stun.h Wed Oct 26 00:33:21 2005 +0000 +++ b/src/stun.h Wed Oct 26 00:34:26 2005 +0000 @@ -30,13 +30,17 @@ /**************************************************************************/ struct stun_nattype { - gint status; // 0 - unknown (no STUN server reachable), 1 - discovering, 2 - discovered - gint type; // 0 - public ip - // 1 - NAT (unknown type) - // 2 - full cone - // 3 - restricted cone - // 4 - port restricted cone - // 5 - symmetric + gint status; /* 0 - unknown (no STUN server reachable) */ + /* 1 - discovering */ + /* 2 - discovered */ + + gint type; /* 0 - public ip */ + /* 1 - NAT (unknown type) */ + /* 2 - full cone */ + /* 3 - restricted cone */ + /* 4 - port restricted cone */ + /* 5 - symmetric */ + char publicip[16]; };
--- a/src/win32/win32dep.c Wed Oct 26 00:33:21 2005 +0000 +++ b/src/win32/win32dep.c Wed Oct 26 00:34:26 2005 +0000 @@ -59,8 +59,8 @@ typedef HRESULT (CALLBACK* LPFNSHGETFOLDERPATHW)(HWND, int, HANDLE, DWORD, LPWSTR); typedef enum { - SHGFP_TYPE_CURRENT = 0, // current value for user, verify it exists - SHGFP_TYPE_DEFAULT = 1, // default value, may not exist + SHGFP_TYPE_CURRENT = 0, /* current value for user, verify it exists */ + SHGFP_TYPE_DEFAULT = 1, /* default value, may not exist */ } SHGFP_TYPE; /*