~ubuntu-branches/ubuntu/trusty/xscreensaver/trusty

« back to all changes in this revision

Viewing changes to hacks/glx/sonar-icmp.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-11-30 13:33:13 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091130133313-3b5nz2e7hvbb8h3l
Tags: 5.10-3ubuntu1
* Merge with Debian unstable, remaining changes: (LP: #489062)
  - debian/control: add Build-Depends on ubuntu-artwork
  - debian/rules: use /usr/share/backgrounds
  - debian/control: Move xli | xloadimage recommends to suggests
  - debian/split-hacks.config: Use different set of default hacks to Debian
  - debian/source_xscreensaver.py: Add apport hook
  - debian/patches/53_XScreenSaver.ad.in.patch: Use Ubuntu branding

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* sonar, Copyright (c) 1998-2008 Jamie Zawinski and Stephen Martin
 
1
/* sonar, Copyright (c) 1998-2009 Jamie Zawinski and Stephen Martin
2
2
 *
3
3
 * Permission to use, copy, modify, distribute, and sell this software and its
4
4
 * documentation for any purpose is hereby granted without fee, provided that
205
205
          strlen (sb->name) >= 80)
206
206
        return 0;
207
207
 
 
208
      /* .ssh/known_hosts sometimes contains weirdness like "[host]:port".
 
209
         Ignore it. */
 
210
      if (strchr (sb->name, '['))
 
211
        {
 
212
          if (pd->debug_p)
 
213
            fprintf (stderr, "%s:   ignoring bogus address \"%s\"\n", 
 
214
                     progname, sb->name);
 
215
          return 0;
 
216
        }
 
217
 
 
218
      /* If the name contains a colon, it's probably IPv6. */
 
219
      if (strchr (sb->name, ':'))
 
220
        {
 
221
          if (pd->debug_p)
 
222
            fprintf (stderr, "%s:   ignoring ipv6 address \"%s\"\n", 
 
223
                     progname, sb->name);
 
224
          return 0;
 
225
        }
 
226
 
208
227
      hent = gethostbyname (sb->name);
209
228
      if (!hent)
210
229
        {
211
230
          if (pd->debug_p)
212
 
            fprintf (stderr, "%s: could not resolve host:  %s\n",
 
231
            fprintf (stderr, "%s:   could not resolve host:  %s\n",
213
232
                     progname, sb->name);
214
233
          return 0;
215
234
        }
327
346
  if (!fp)
328
347
    {
329
348
      char buf[1024];
330
 
      sprintf(buf, "%s: %s", progname, filename);
 
349
      sprintf(buf, "%s:  %s", progname, filename);
331
350
#ifdef HAVE_COCOA
332
351
      if (pd->debug_p)  /* on OSX don't syslog this */
333
352
#endif