comparison libpurple/protocols/bonjour/mdns_win32.c @ 22052:1be0d49532a1

Fix the _presence._tcp. record not to be referred to as the ICHAT_PRESENCE, that has been bothering me for a while.
author Daniel Atallah <daniel.atallah@gmail.com>
date Wed, 09 Jan 2008 19:07:16 +0000
parents 71d18f5adbba
children d50194ab3016
comparison
equal deleted inserted replaced
22051:92eeb7f5b3c9 22052:1be0d49532a1
474 DNSServiceRef presence_sr; 474 DNSServiceRef presence_sr;
475 475
476 switch (type) { 476 switch (type) {
477 case PUBLISH_START: 477 case PUBLISH_START:
478 purple_debug_info("bonjour", "Registering presence on port %d\n", data->port_p2pj); 478 purple_debug_info("bonjour", "Registering presence on port %d\n", data->port_p2pj);
479 errorCode = DNSServiceRegister(&presence_sr, 0, 0, purple_account_get_username(data->account), ICHAT_SERVICE, 479 errorCode = DNSServiceRegister(&presence_sr, 0, 0, purple_account_get_username(data->account), LINK_LOCAL_RECORD_NAME,
480 NULL, NULL, htons(data->port_p2pj), TXTRecordGetLength(&dns_data), TXTRecordGetBytesPtr(&dns_data), 480 NULL, NULL, htons(data->port_p2pj), TXTRecordGetLength(&dns_data), TXTRecordGetBytesPtr(&dns_data),
481 _mdns_service_register_callback, NULL); 481 _mdns_service_register_callback, NULL);
482 break; 482 break;
483 483
484 case PUBLISH_UPDATE: 484 case PUBLISH_UPDATE:
513 Win32SessionImplData *idata = data->mdns_impl_data; 513 Win32SessionImplData *idata = data->mdns_impl_data;
514 DNSServiceRef browser_sr; 514 DNSServiceRef browser_sr;
515 515
516 g_return_val_if_fail(idata != NULL, FALSE); 516 g_return_val_if_fail(idata != NULL, FALSE);
517 517
518 errorCode = DNSServiceBrowse(&browser_sr, 0, 0, ICHAT_SERVICE, NULL, 518 errorCode = DNSServiceBrowse(&browser_sr, 0, 0, LINK_LOCAL_RECORD_NAME, NULL,
519 _mdns_service_browse_callback, data->account); 519 _mdns_service_browse_callback, data->account);
520 if (errorCode == kDNSServiceErr_NoError) { 520 if (errorCode == kDNSServiceErr_NoError) {
521 idata->browser_query = g_new(DnsSDServiceRefHandlerData, 1); 521 idata->browser_query = g_new(DnsSDServiceRefHandlerData, 1);
522 idata->browser_query->sdRef = browser_sr; 522 idata->browser_query->sdRef = browser_sr;
523 idata->browser_query->account = data->account; 523 idata->browser_query->account = data->account;
620 DNSServiceRefDeallocate(idata->null_query->sdRef); 620 DNSServiceRefDeallocate(idata->null_query->sdRef);
621 g_free(idata->null_query); 621 g_free(idata->null_query);
622 idata->null_query = NULL; 622 idata->null_query = NULL;
623 } 623 }
624 624
625 if (DNSServiceConstructFullName(svc_name, buddy->name, ICHAT_SERVICE, "local") != 0) 625 if (DNSServiceConstructFullName(svc_name, buddy->name, LINK_LOCAL_RECORD_NAME, "local") != 0)
626 purple_debug_error("bonjour", "Unable to construct full name to retrieve buddy icon for %s.\n", buddy->name); 626 purple_debug_error("bonjour", "Unable to construct full name to retrieve buddy icon for %s.\n", buddy->name);
627 else { 627 else {
628 DNSServiceRef null_query_sr; 628 DNSServiceRef null_query_sr;
629 629
630 DNSServiceErrorType errorCode = DNSServiceQueryRecord(&null_query_sr, 0, kDNSServiceInterfaceIndexAny, 630 DNSServiceErrorType errorCode = DNSServiceQueryRecord(&null_query_sr, 0, kDNSServiceInterfaceIndexAny,